mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-08-05 21:11:11 +00:00
Compare commits
541 commits
mbedtls-2.
...
mbedtls-2.
Author | SHA1 | Date | |
---|---|---|---|
|
8c88150ca1 | ||
|
6bd2de5c86 | ||
|
cb2784cbd8 | ||
|
5b8f4db757 | ||
|
23e5f715f1 | ||
|
e2c417d324 | ||
|
377f4eda27 | ||
|
531aede488 | ||
|
87e7b95767 | ||
|
91edd1e701 | ||
|
21dab7aee6 | ||
|
bab7ef4f0d | ||
|
1724bd2a4f | ||
|
52d0b48f04 | ||
|
270626ee70 | ||
|
5a1d0fc55f | ||
|
8d2b7aaede | ||
|
08d6737368 | ||
|
0ec5979461 | ||
|
217565ef4e | ||
|
46bef5f929 | ||
|
c24a1e86da | ||
|
6527cd382b | ||
|
3e7b61c42b | ||
|
cd7d074ff9 | ||
|
2c8cfcf59f | ||
|
c3ccae7faf | ||
|
984fd07c53 | ||
|
228b98f24f | ||
|
384a0880c4 | ||
|
aa9dfbfdf4 | ||
|
05371be430 | ||
|
b72f0ed48a | ||
|
f70a3144a0 | ||
|
cb25374b2c | ||
|
22092e483e | ||
|
4a5ed0231d | ||
|
09d33092cb | ||
|
d80763761f | ||
|
a7e586bc2f | ||
|
c5714bb4ea | ||
|
b7bb068b84 | ||
|
5bf15b6d63 | ||
|
d61fa61bef | ||
|
7bee63a310 | ||
|
c776582dc3 | ||
|
18a8698e76 | ||
|
2ed6fe0b30 | ||
|
c785394ba6 | ||
|
cd65b62f21 | ||
|
0c0f9adab1 | ||
|
c22d0b9d5b | ||
|
4823624542 | ||
|
490c5d4628 | ||
|
6f69d4c7e2 | ||
|
4c71707987 | ||
|
7dac825a3c | ||
|
e8ee0f1a94 | ||
|
6a66737433 | ||
|
86cb928e54 | ||
|
f13a47bbb2 | ||
|
8d265f75a4 | ||
|
69b904b679 | ||
|
1b6a24f759 | ||
|
738d2310a7 | ||
|
388a9d3a8b | ||
|
121d7c7c14 | ||
|
58ec378912 | ||
|
f604240b1b | ||
|
b01ce91745 | ||
|
57f8e9116e | ||
|
210a0168d5 | ||
|
6855d1a457 | ||
|
ed9f7989f2 | ||
|
ce455ddb3e | ||
|
3c30a7aeda | ||
|
718972e94e | ||
|
b9fce3cea1 | ||
|
ab5849527d | ||
|
468ef4b3c7 | ||
|
0c11622504 | ||
|
fb6876a111 | ||
|
b5e295d5c9 | ||
|
05974893e6 | ||
|
831956980c | ||
|
2ecc0b89f3 | ||
|
89816bc020 | ||
|
7ba73e5756 | ||
|
7252ec3947 | ||
|
cd2e248fdd | ||
|
6c91b7c91e | ||
|
e8d7e6c6e4 | ||
|
c071373842 | ||
|
96a7064754 | ||
|
44e89c547f | ||
|
7f652adc48 | ||
|
47e4035e98 | ||
|
2cf44b6941 | ||
|
634fe27a12 | ||
|
fee234afcd | ||
|
9039f16c48 | ||
|
80fa1b4d8f | ||
|
9c6cb217f1 | ||
|
80a2c2a5f9 | ||
|
6260b70717 | ||
|
9a3cf3174d | ||
|
5d453ee882 | ||
|
226626fd42 | ||
|
a82e56aa91 | ||
|
01c69377bd | ||
|
0b7cb319cd | ||
|
629fd9362c | ||
|
15c39e53e5 | ||
|
3b7523e11e | ||
|
3fac0bae4a | ||
|
3d5d889e0d | ||
|
7bbd7ea7ad | ||
|
f3493024f6 | ||
|
69029cd29b | ||
|
a4b98a970f | ||
|
2d3f296729 | ||
|
22a854ab96 | ||
|
15e860c639 | ||
|
9e8acb6861 | ||
|
319b5939dd | ||
|
3f35b87db9 | ||
|
8ed9ac85e5 | ||
|
bcfa41753d | ||
|
07d1f47a39 | ||
|
77cb30c3cb | ||
|
5dd1e266e1 | ||
|
74b7ee4f12 | ||
|
c7ea6340cf | ||
|
49e6e9d410 | ||
|
ce6fa8f411 | ||
|
877329af75 | ||
|
a18813ea1c | ||
|
4a0ccb6862 | ||
|
415c7be0aa | ||
|
25038abadb | ||
|
63d19c0586 | ||
|
ad59a2a4a7 | ||
|
4c1939738d | ||
|
027b601690 | ||
|
e98bbbeb06 | ||
|
7bd481cad2 | ||
|
d2d0e70276 | ||
|
0b9bc0bd77 | ||
|
671600cd44 | ||
|
d31012ecea | ||
|
56ad24cad7 | ||
|
d552630f33 | ||
|
1a0c7fb383 | ||
|
0391ea39c1 | ||
|
bc60d69153 | ||
|
0525114752 | ||
|
2f78062e75 | ||
|
debf3ae54e | ||
|
e3645ee8b4 | ||
|
3cfee6c71e | ||
|
25dee5df1a | ||
|
9f0da915b5 | ||
|
e78a0c3e14 | ||
|
481ff8e621 | ||
|
8ffc158c36 | ||
|
43f2f4eeed | ||
|
0ac6e0a8dc | ||
|
076c97e29a | ||
|
0a635600ba | ||
|
a3e57531d1 | ||
|
bc7379022f | ||
|
f9a7f5feca | ||
|
23cb65e32f | ||
|
22c4385e25 | ||
|
13b8a26730 | ||
|
567bd958ff | ||
|
23055427af | ||
|
9a8aee45b6 | ||
|
ff28df98f5 | ||
|
0df9c529a9 | ||
|
ffdcadf084 | ||
|
663d0993ec | ||
|
91ee76380c | ||
|
02c7b48a70 | ||
|
fbd0110dbd | ||
|
b74e0d0bc5 | ||
|
e944cac87a | ||
|
bd1b89a354 | ||
|
2f26bf7e88 | ||
|
90b545881c | ||
|
188e192eeb | ||
|
e1a7cad3c6 | ||
|
27db5e4405 | ||
|
36c2ea5376 | ||
|
4785ec1dbc | ||
|
319eee5fdd | ||
|
b2aeb75509 | ||
|
3ce9480c38 | ||
|
12b89cbc0b | ||
|
e39d14b142 | ||
|
506498eaa3 | ||
|
84d4f022e2 | ||
|
401ba5e9b7 | ||
|
e72c8d28f1 | ||
|
f9604bbdc1 | ||
|
30b242de50 | ||
|
70f7f67133 | ||
|
f21639fc2f | ||
|
5feba8dae1 | ||
|
d5253bba32 | ||
|
2681e99a41 | ||
|
0c633dab7f | ||
|
87d7936d40 | ||
|
99693aab21 | ||
|
1bfb45cb93 | ||
|
e4dbb99f9f | ||
|
639c5e5713 | ||
|
359d049f1b | ||
|
ad5c5a2763 | ||
|
319ecf3192 | ||
|
dfb5cff2f5 | ||
|
848a4e06b3 | ||
|
627aeef6ae | ||
|
1bfb580f8c | ||
|
4ac5a7be5a | ||
|
36169d479f | ||
|
de4bcf22c1 | ||
|
fa3b3e0d88 | ||
|
75475d8465 | ||
|
f0a3cddefe | ||
|
c9ebbd5843 | ||
|
5b2e60dc36 | ||
|
ab9ec32879 | ||
|
46f49a8bbc | ||
|
f08284769d | ||
|
590b2d9614 | ||
|
ce45d1a759 | ||
|
f0b469e42b | ||
|
14cb46de24 | ||
|
8c3fa63f90 | ||
|
d69edda8de | ||
|
650ce76544 | ||
|
03b4ef6a05 | ||
|
50f6a192b5 | ||
|
e6e812a712 | ||
|
6b739bb138 | ||
|
c3d0a7f1ec | ||
|
db1e7a8f7b | ||
|
0ac8a78aa7 | ||
|
300e1b3a6f | ||
|
91615cf7ff | ||
|
0e7bdd1340 | ||
|
2dcd0674e6 | ||
|
2645bcc709 | ||
|
2823efabc8 | ||
|
a2947ac7bb | ||
|
daba4f67cc | ||
|
b9c64e4538 | ||
|
5bfa623e9b | ||
|
19735b69b8 | ||
|
4ca60502d8 | ||
|
62870c9a7e | ||
|
a1919ad6e0 | ||
|
7442f843d5 | ||
|
581af9f720 | ||
|
bedcb3eb24 | ||
|
cbd5c03343 | ||
|
e63fc6d52b | ||
|
fcf6c16470 | ||
|
9acf943b98 | ||
|
1505e42de9 | ||
|
ba5cba838c | ||
|
d5f8c26e01 | ||
|
3fa7c64edf | ||
|
0ca801af76 | ||
|
de7e03688d | ||
|
4ddfdbf76a | ||
|
6579235d9c | ||
|
d8dc8e29c1 | ||
|
58c8da2d7e | ||
|
dfd517234d | ||
|
c703cf1aec | ||
|
9ad5128324 | ||
|
f1ef89586b | ||
|
b394b43cf8 | ||
|
3eaa10389d | ||
|
7433fa4f4a | ||
|
f82cb79b87 | ||
|
681615a276 | ||
|
8e8898d40f | ||
|
4bdc13ff09 | ||
|
aea41df254 | ||
|
9fde353f68 | ||
|
d239794deb | ||
|
e1b1fffaad | ||
|
cf03a61d97 | ||
|
253b0de23d | ||
|
09ac297f7f | ||
|
94fd8dc066 | ||
|
2b2f956f22 | ||
|
2b80249c04 | ||
|
5bb6f3c3db | ||
|
a6c1317685 | ||
|
74503bb5fc | ||
|
1e94128f30 | ||
|
de02b580c8 | ||
|
0dab12ec2c | ||
|
a237722118 | ||
|
368fc65f80 | ||
|
fde750550d | ||
|
a60d0f2acb | ||
|
87a602dd67 | ||
|
cadcf4cec6 | ||
|
8be9d3b833 | ||
|
49e94e3889 | ||
|
86ad5be18a | ||
|
d96edbc600 | ||
|
41ee83972b | ||
|
7d6326dbf9 | ||
|
84697ca359 | ||
|
2845fcc8ab | ||
|
a242f50acd | ||
|
1535a43149 | ||
|
afc2717e84 | ||
|
f90597f21e | ||
|
c33e92189a | ||
|
cfc77d49bd | ||
|
eeea9ead3c | ||
|
beaf396619 | ||
|
a586099fd3 | ||
|
ee69477890 | ||
|
5b6bebe2de | ||
|
15a7cd1052 | ||
|
abc460236f | ||
|
dd5f369328 | ||
|
599a234000 | ||
|
6c48d09c2f | ||
|
ef5f8fc52a | ||
|
49e6caf12e | ||
|
14a5645cbf | ||
|
1d5ef2919b | ||
|
b2eb38d391 | ||
|
afbe3ee87c | ||
|
7e8f1af0a6 | ||
|
d7a4df8341 | ||
|
6d1f0ad7b6 | ||
|
5b13a86e11 | ||
|
a0c9ff3e52 | ||
|
c9914ecd01 | ||
|
c7f8aec493 | ||
|
fc253b38bb | ||
|
f69b919844 | ||
|
eab4a7a05d | ||
|
805b1461b8 | ||
|
d2b5ad871d | ||
|
1ee685018a | ||
|
de4ad2da38 | ||
|
3a1944a187 | ||
|
81286d242e | ||
|
b0c260881f | ||
|
1bff6847fb | ||
|
c2400d38fe | ||
|
2df1423eff | ||
|
66e4dffa4e | ||
|
2df5857dbe | ||
|
2ebb1e18e9 | ||
|
20cd85c6e1 | ||
|
7d7c00412f | ||
|
a90a95bcbd | ||
|
2d91c30f4c | ||
|
424210a93c | ||
|
301a9ee583 | ||
|
72177e362b | ||
|
0defc579d7 | ||
|
18b0b3c4b5 | ||
|
c7295f5416 | ||
|
c334f41bf9 | ||
|
84fd657240 | ||
|
b34aeeb8d6 | ||
|
047986c2f8 | ||
|
d18f0519a5 | ||
|
fb11d252b2 | ||
|
23983f30de | ||
|
948cd23845 | ||
|
f744bd72ee | ||
|
51b41d5422 | ||
|
468a76f88a | ||
|
efb669c280 | ||
|
9581fa3050 | ||
|
32b629dc99 | ||
|
157cffebab | ||
|
f250380df3 | ||
|
d7296020a6 | ||
|
f8f61aad0f | ||
|
7ea4b4d70a | ||
|
711eea30b9 | ||
|
35f8a54405 | ||
|
8f397268d3 | ||
|
dbe3d2b434 | ||
|
cd6fd060ec | ||
|
74fc3be396 | ||
|
001eb3cec4 | ||
|
de719d5d69 | ||
|
08fd43c4f6 | ||
|
635a374944 | ||
|
36acd547c5 | ||
|
46bf7da684 | ||
|
6a9433ef34 | ||
|
5f5695077d | ||
|
8f6726623a | ||
|
c81c5889e9 | ||
|
3ce3ddf1ac | ||
|
bdcb39616d | ||
|
e9073a6cb2 | ||
|
471ae59783 | ||
|
3a562d75fb | ||
|
62b293df5b | ||
|
c5243c198c | ||
|
8cb1981acd | ||
|
7c0f1c3067 | ||
|
49d3dd0afc | ||
|
014ff5b0d6 | ||
|
503b79e866 | ||
|
f2c6e340de | ||
|
2d727dfe64 | ||
|
f25cd6ba5f | ||
|
d9701ae21e | ||
|
ed1f673525 | ||
|
8bfe12b1ff | ||
|
f54a5de66a | ||
|
934080e731 | ||
|
b6484875cc | ||
|
3c23c82dac | ||
|
43c74d20de | ||
|
401825148f | ||
|
66de311e0b | ||
|
cd29f862f6 | ||
|
ce5d854dca | ||
|
ffaef81586 | ||
|
e6f1f245f5 | ||
|
125f89b893 | ||
|
e856ba11a1 | ||
|
5893bdc513 | ||
|
2dfc9fe293 | ||
|
d2f0073c09 | ||
|
e913f911cd | ||
|
4f84cc7d67 | ||
|
c64d847127 | ||
|
2c6089f52a | ||
|
98aa53d0e4 | ||
|
0665677265 | ||
|
2eefeeebdb | ||
|
c98ca37cb9 | ||
|
6645fd31e7 | ||
|
8b34fef0a8 | ||
|
543e6c5a7e | ||
|
ff8ae11159 | ||
|
b58d07f892 | ||
|
01836bffe0 | ||
|
0f593416e0 | ||
|
21f2ba54f7 | ||
|
43e068c9eb | ||
|
e6c0c7d369 | ||
|
dac156b631 | ||
|
fcccfbc64a | ||
|
a3c6c8a945 | ||
|
77b1f3051a | ||
|
1e8cafcd3d | ||
|
313bb50db3 | ||
|
d135bbd7a1 | ||
|
5ac979309b | ||
|
971e5e9f98 | ||
|
1e557b7f17 | ||
|
df4f7c1274 | ||
|
4796c19516 | ||
|
899f63805a | ||
|
08fc4aaec0 | ||
|
d6189e115d | ||
|
108ebf2b26 | ||
|
df5614ef1d | ||
|
989d05ffd8 | ||
|
eb59af14b0 | ||
|
2ccdf897d8 | ||
|
e335816bf6 | ||
|
468adcc20b | ||
|
7c8c9c9531 | ||
|
317e7a19eb | ||
|
1c2c1bd7b0 | ||
|
025747bd81 | ||
|
4b29e7d682 | ||
|
9a0e0f2655 | ||
|
5a711aba01 | ||
|
ec4c956372 | ||
|
9d0cee0d08 | ||
|
034ee2b848 | ||
|
7c4912d758 | ||
|
f2cf40ba1a | ||
|
67c3c3fc1b | ||
|
5bd9f56d15 | ||
|
c91c38182a | ||
|
74c9e5750e | ||
|
9307375f2e | ||
|
f0b343c39f | ||
|
cff94e33b0 | ||
|
9fb6324687 | ||
|
ff873432d4 | ||
|
15316fdb94 | ||
|
edf0076a00 | ||
|
531b00bb39 | ||
|
12c299caea | ||
|
3d9b798f60 | ||
|
bd8caeb65c | ||
|
da1d437389 | ||
|
acf7f2ce93 | ||
|
e675a8d9bb | ||
|
01955792b3 | ||
|
a8bc32872a | ||
|
11b0269696 | ||
|
867ab917db | ||
|
399b82f986 | ||
|
5d1dfd4108 | ||
|
a1bb3f86e9 | ||
|
af67f8db77 | ||
|
ea16e3dd7f | ||
|
926f696a73 | ||
|
8c3ad4bfcb | ||
|
c373000307 | ||
|
ce56956f59 | ||
|
fea21d4c3d | ||
|
368ccd416b | ||
|
0d5b016709 | ||
|
cecc726b91 | ||
|
1978b68a2f | ||
|
eb9929e6e1 | ||
|
d69f51b216 | ||
|
b19ad118dd | ||
|
69cc630750 | ||
|
bde4d3045b | ||
|
07c83f27ad | ||
|
6d10a56ce8 | ||
|
3b0c430638 |
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -40,4 +40,5 @@ massif-*
|
||||||
/GSYMS
|
/GSYMS
|
||||||
/GTAGS
|
/GTAGS
|
||||||
/TAGS
|
/TAGS
|
||||||
|
/cscope*.out
|
||||||
/tags
|
/tags
|
||||||
|
|
22
.pylintrc
22
.pylintrc
|
@ -40,7 +40,27 @@ max-attributes=15
|
||||||
max-module-lines=2000
|
max-module-lines=2000
|
||||||
|
|
||||||
[MESSAGES CONTROL]
|
[MESSAGES CONTROL]
|
||||||
disable=
|
# * locally-disabled, locally-enabled: If we disable or enable a message
|
||||||
|
# locally, it's by design. There's no need to clutter the Pylint output
|
||||||
|
# with this information.
|
||||||
|
# * logging-format-interpolation: Pylint warns about things like
|
||||||
|
# ``log.info('...'.format(...))``. It insists on ``log.info('...', ...)``.
|
||||||
|
# This is of minor utility (mainly a performance gain when there are
|
||||||
|
# many messages that use formatting and are below the log level).
|
||||||
|
# Some versions of Pylint (including 1.8, which is the version on
|
||||||
|
# Ubuntu 18.04) only recognize old-style format strings using '%',
|
||||||
|
# and complain about something like ``log.info('{}', foo)`` with
|
||||||
|
# logging-too-many-args (Pylint supports new-style formatting if
|
||||||
|
# declared globally with logging_format_style under [LOGGING] but
|
||||||
|
# this requires Pylint >=2.2).
|
||||||
|
# * no-else-return: Allow the perfectly reasonable idiom
|
||||||
|
# if condition1:
|
||||||
|
# return value1
|
||||||
|
# else:
|
||||||
|
# return value2
|
||||||
|
# * unnecessary-pass: If we take the trouble of adding a line with "pass",
|
||||||
|
# it's because we think the code is clearer that way.
|
||||||
|
disable=locally-disabled,locally-enabled,logging-format-interpolation,no-else-return,unnecessary-pass
|
||||||
|
|
||||||
[REPORTS]
|
[REPORTS]
|
||||||
# Don't diplay statistics. Just the facts.
|
# Don't diplay statistics. Just the facts.
|
||||||
|
|
72
.travis.yml
72
.travis.yml
|
@ -1,48 +1,64 @@
|
||||||
language: c
|
language: c
|
||||||
compiler:
|
compiler: gcc
|
||||||
- clang
|
|
||||||
- gcc
|
|
||||||
sudo: false
|
sudo: false
|
||||||
cache: ccache
|
cache: ccache
|
||||||
|
|
||||||
# blocklist
|
jobs:
|
||||||
branches:
|
include:
|
||||||
except:
|
- name: basic checks and reference configurations
|
||||||
- development-psa
|
addons:
|
||||||
- coverity_scan
|
apt:
|
||||||
|
packages:
|
||||||
|
- gnutls-bin
|
||||||
|
- doxygen
|
||||||
|
- graphviz
|
||||||
|
- gcc-arm-none-eabi
|
||||||
|
- libnewlib-arm-none-eabi
|
||||||
|
language: python # Needed to get pip for Python 3
|
||||||
|
python: 3.5 # version from Ubuntu 16.04
|
||||||
|
install:
|
||||||
|
- pip install pylint==2.4.4
|
||||||
|
script:
|
||||||
|
- tests/scripts/all.sh -k 'check_*'
|
||||||
|
- tests/scripts/all.sh -k test_default_out_of_box
|
||||||
|
- tests/scripts/test-ref-configs.pl
|
||||||
|
- tests/scripts/all.sh -k build_arm_none_eabi_gcc_arm5vte build_arm_none_eabi_gcc_m0plus
|
||||||
|
|
||||||
|
- name: full configuration
|
||||||
|
script:
|
||||||
|
- tests/scripts/all.sh -k test_full_cmake_gcc_asan
|
||||||
|
|
||||||
|
- name: check compilation guards
|
||||||
|
script:
|
||||||
|
- tests/scripts/all.sh -k 'test_depends_*' 'build_key_exchanges'
|
||||||
|
|
||||||
|
- name: macOS
|
||||||
|
os: osx
|
||||||
|
compiler: clang
|
||||||
|
script:
|
||||||
|
- tests/scripts/all.sh -k test_default_out_of_box
|
||||||
|
|
||||||
|
- name: Windows
|
||||||
|
os: windows
|
||||||
|
script:
|
||||||
|
- scripts/windows_msbuild.bat v141 # Visual Studio 2017
|
||||||
|
|
||||||
script:
|
|
||||||
- tests/scripts/recursion.pl library/*.c
|
|
||||||
- tests/scripts/check-generated-files.sh
|
|
||||||
- tests/scripts/check-doxy-blocks.pl
|
|
||||||
- tests/scripts/check-names.sh
|
|
||||||
- tests/scripts/check-files.py
|
|
||||||
- tests/scripts/doxygen.sh
|
|
||||||
- cmake -D CMAKE_BUILD_TYPE:String="Check" .
|
|
||||||
- make
|
|
||||||
- make test
|
|
||||||
- programs/test/selftest
|
|
||||||
- OSSL_NO_DTLS=1 tests/compat.sh
|
|
||||||
- tests/ssl-opt.sh -e '\(DTLS\|SCSV\).*openssl'
|
|
||||||
- tests/scripts/test-ref-configs.pl
|
|
||||||
- tests/scripts/curves.pl
|
|
||||||
- tests/scripts/key-exchanges.pl
|
|
||||||
after_failure:
|
after_failure:
|
||||||
- tests/scripts/travis-log-failure.sh
|
- tests/scripts/travis-log-failure.sh
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- SEED=1
|
- SEED=1
|
||||||
- secure: "barHldniAfXyoWOD/vcO+E6/Xm4fmcaUoC9BeKW+LwsHqlDMLvugaJnmLXkSpkbYhVL61Hzf3bo0KPJn88AFc5Rkf8oYHPjH4adMnVXkf3B9ghHCgznqHsAH3choo6tnPxaFgOwOYmLGb382nQxfE5lUdvnM/W/psQjWt66A1+k="
|
- secure: "FrI5d2s+ckckC17T66c8jm2jV6i2DkBPU5nyWzwbedjmEBeocREfQLd/x8yKpPzLDz7ghOvr+/GQvsPPn0dVkGlNzm3Q+hGHc/ujnASuUtGrcuMM+0ALnJ3k4rFr9xEvjJeWb4SmhJO5UCAZYvTItW4k7+bj9L+R6lt3TzQbXzg="
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
- doxygen
|
- gnutls-bin
|
||||||
- graphviz
|
|
||||||
coverity_scan:
|
coverity_scan:
|
||||||
project:
|
project:
|
||||||
name: "ARMmbed/mbedtls"
|
name: "ARMmbed/mbedtls"
|
||||||
notification_email: simon.butcher@arm.com
|
notification_email: support-mbedtls@arm.com
|
||||||
build_command_prepend:
|
build_command_prepend:
|
||||||
build_command: make
|
build_command: make
|
||||||
branch_pattern: coverity_scan
|
branch_pattern: coverity_scan
|
||||||
|
|
|
@ -8,7 +8,7 @@ endif()
|
||||||
option(USE_PKCS11_HELPER_LIBRARY "Build mbed TLS with the pkcs11-helper library." OFF)
|
option(USE_PKCS11_HELPER_LIBRARY "Build mbed TLS with the pkcs11-helper library." OFF)
|
||||||
option(ENABLE_ZLIB_SUPPORT "Build mbed TLS with zlib library." OFF)
|
option(ENABLE_ZLIB_SUPPORT "Build mbed TLS with zlib library." OFF)
|
||||||
|
|
||||||
option(ENABLE_PROGRAMS "Build mbed TLS programs." ON)
|
option(ENABLE_PROGRAMS "Build mbed TLS programs." OFF)
|
||||||
|
|
||||||
option(UNSAFE_BUILD "Allow unsafe builds. These builds ARE NOT SECURE." OFF)
|
option(UNSAFE_BUILD "Allow unsafe builds. These builds ARE NOT SECURE." OFF)
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ string(REGEX MATCH "MSVC" CMAKE_COMPILER_IS_MSVC "${CMAKE_C_COMPILER_ID}")
|
||||||
if(CMAKE_COMPILER_IS_MSVC)
|
if(CMAKE_COMPILER_IS_MSVC)
|
||||||
option(ENABLE_TESTING "Build mbed TLS tests." OFF)
|
option(ENABLE_TESTING "Build mbed TLS tests." OFF)
|
||||||
else()
|
else()
|
||||||
option(ENABLE_TESTING "Build mbed TLS tests." ON)
|
option(ENABLE_TESTING "Build mbed TLS tests." OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Warning string - created as a list for compatibility with CMake 2.8
|
# Warning string - created as a list for compatibility with CMake 2.8
|
||||||
|
@ -157,6 +157,9 @@ if(CMAKE_COMPILER_IS_IAR)
|
||||||
endif(CMAKE_COMPILER_IS_IAR)
|
endif(CMAKE_COMPILER_IS_IAR)
|
||||||
|
|
||||||
if(CMAKE_COMPILER_IS_MSVC)
|
if(CMAKE_COMPILER_IS_MSVC)
|
||||||
|
# Compile with UTF-8 encoding (REMOVE THIS COMMIT ONCE A FIX IS DEPLOYED UPSTREAM)
|
||||||
|
add_compile_options(/utf-8)
|
||||||
|
|
||||||
# Strictest warnings, and treat as errors
|
# Strictest warnings, and treat as errors
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3")
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX")
|
||||||
|
|
|
@ -14,7 +14,7 @@ Coding Standards
|
||||||
|
|
||||||
Making a Contribution
|
Making a Contribution
|
||||||
---------------------
|
---------------------
|
||||||
1. [Check for open issues](https://github.com/ARMmbed/mbedtls/issues) or [start a discussion](https://tls.mbed.org/discussions) around a feature idea or a bug.
|
1. [Check for open issues](https://github.com/ARMmbed/mbedtls/issues) or [start a discussion](https://lists.trustedfirmware.org/mailman/listinfo/mbed-tls) around a feature idea or a bug.
|
||||||
1. Fork the [Mbed TLS repository on GitHub](https://github.com/ARMmbed/mbedtls) to start making your changes. As a general rule, you should use the ["development" branch](https://github.com/ARMmbed/mbedtls/tree/development) as a basis.
|
1. Fork the [Mbed TLS repository on GitHub](https://github.com/ARMmbed/mbedtls) to start making your changes. As a general rule, you should use the ["development" branch](https://github.com/ARMmbed/mbedtls/tree/development) as a basis.
|
||||||
1. Write a test which shows that the bug was fixed or that the feature works as expected.
|
1. Write a test which shows that the bug was fixed or that the feature works as expected.
|
||||||
1. Send a pull request (PR) and work with us until it gets merged and published. Contributions may need some modifications, so a few rounds of review and fixing may be necessary. We will include your name in the ChangeLog :)
|
1. Send a pull request (PR) and work with us until it gets merged and published. Contributions may need some modifications, so a few rounds of review and fixing may be necessary. We will include your name in the ChangeLog :)
|
||||||
|
@ -79,4 +79,4 @@ Mbed TLS is well documented, but if you think documentation is needed, speak out
|
||||||
1. Complex parts in the code should include comments.
|
1. Complex parts in the code should include comments.
|
||||||
1. If needed, a Readme file is advised.
|
1. If needed, a Readme file is advised.
|
||||||
1. If a [Knowledge Base (KB)](https://tls.mbed.org/kb) article should be added, write this as a comment in the PR description.
|
1. If a [Knowledge Base (KB)](https://tls.mbed.org/kb) article should be added, write this as a comment in the PR description.
|
||||||
1. A [ChangeLog](https://github.com/ARMmbed/mbedtls/blob/development/ChangeLog) entry should be added for this contribution.
|
1. A [ChangeLog](https://github.com/ARMmbed/mbedtls/blob/development/ChangeLog.d/00README.md) entry should be added for this contribution.
|
||||||
|
|
232
ChangeLog
232
ChangeLog
|
@ -1,5 +1,237 @@
|
||||||
mbed TLS ChangeLog (Sorted per branch, date)
|
mbed TLS ChangeLog (Sorted per branch, date)
|
||||||
|
|
||||||
|
= mbed TLS 2.16.10 branch released 2021-03-12
|
||||||
|
|
||||||
|
Default behavior changes
|
||||||
|
* In mbedtls_rsa_context objects, the ver field was formerly documented
|
||||||
|
as always 0. It is now reserved for internal purposes and may take
|
||||||
|
different values.
|
||||||
|
|
||||||
|
Security
|
||||||
|
* Fix a buffer overflow in mbedtls_mpi_sub_abs() when calculating
|
||||||
|
|A| - |B| where |B| is larger than |A| and has more limbs (so the
|
||||||
|
function should return MBEDTLS_ERR_MPI_NEGATIVE_VALUE). Only
|
||||||
|
applications calling mbedtls_mpi_sub_abs() directly are affected:
|
||||||
|
all calls inside the library were safe since this function is
|
||||||
|
only called with |A| >= |B|. Reported by Guido Vranken in #4042.
|
||||||
|
* Fix an errorneous estimation for an internal buffer in
|
||||||
|
mbedtls_pk_write_key_pem(). If MBEDTLS_MPI_MAX_SIZE is set to an odd
|
||||||
|
value the function might fail to write a private RSA keys of the largest
|
||||||
|
supported size.
|
||||||
|
Found by Daniel Otte, reported in #4093 and fixed in #4094,
|
||||||
|
backported in #4100.
|
||||||
|
* Fix a stack buffer overflow with mbedtls_net_poll() and
|
||||||
|
mbedtls_net_recv_timeout() when given a file descriptor that is
|
||||||
|
beyond FD_SETSIZE. Reported by FigBug in #4169.
|
||||||
|
* Guard against strong local side channel attack against base64 tables by
|
||||||
|
making access aceess to them use constant flow code.
|
||||||
|
|
||||||
|
Bugfix
|
||||||
|
* Fix an incorrect error code if an RSA private operation glitched.
|
||||||
|
* Fix a resource leak in CTR_DRBG and HMAC_DRBG when MBEDTLS_THREADING_C
|
||||||
|
is enabled, on platforms where initializing a mutex allocates resources.
|
||||||
|
This was a regression introduced in the previous release. Reported in
|
||||||
|
#4017, #4045 and #4071.
|
||||||
|
* Ensure that calling mbedtls_rsa_free() or mbedtls_entropy_free()
|
||||||
|
twice is safe. This happens for RSA when some Mbed TLS library functions
|
||||||
|
fail. Such a double-free was not safe when MBEDTLS_THREADING_C was
|
||||||
|
enabled on platforms where freeing a mutex twice is not safe.
|
||||||
|
* Fix a resource leak in a bad-arguments case of mbedtls_rsa_gen_key()
|
||||||
|
when MBEDTLS_THREADING_C is enabled on platforms where initializing
|
||||||
|
a mutex allocates resources.
|
||||||
|
* This change makes 'mbedtls_x509write_crt_set_basic_constraints'
|
||||||
|
consistent with RFC 5280 4.2.1.9 which says: "Conforming CAs MUST
|
||||||
|
include this extension in all CA certificates that contain public keys
|
||||||
|
used to validate digital signatures on certificates and MUST mark the
|
||||||
|
extension as critical in such certificates." Previous to this change,
|
||||||
|
the extension was always marked as non-critical. This was fixed by
|
||||||
|
#4044.
|
||||||
|
|
||||||
|
= mbed TLS 2.16.9 branch released 2020-12-11
|
||||||
|
|
||||||
|
Security
|
||||||
|
* Limit the size of calculations performed by mbedtls_mpi_exp_mod to
|
||||||
|
MBEDTLS_MPI_MAX_SIZE to prevent a potential denial of service when
|
||||||
|
generating Diffie-Hellman key pairs. Credit to OSS-Fuzz.
|
||||||
|
* A failure of the random generator was ignored in mbedtls_mpi_fill_random(),
|
||||||
|
which is how most uses of randomization in asymmetric cryptography
|
||||||
|
(including key generation, intermediate value randomization and blinding)
|
||||||
|
are implemented. This could cause failures or the silent use of non-random
|
||||||
|
values. A random generator can fail if it needs reseeding and cannot not
|
||||||
|
obtain entropy, or due to an internal failure (which, for Mbed TLS's own
|
||||||
|
CTR_DRBG or HMAC_DRBG, can only happen due to a misconfiguration).
|
||||||
|
* Fix a compliance issue whereby we were not checking the tag on the
|
||||||
|
algorithm parameters (only the size) when comparing the signature in the
|
||||||
|
description part of the cert to the real signature. This meant that a
|
||||||
|
NULL algorithm parameters entry would look identical to an array of REAL
|
||||||
|
(size zero) to the library and thus the certificate would be considered
|
||||||
|
valid. However, if the parameters do not match in *any* way then the
|
||||||
|
certificate should be considered invalid, and indeed OpenSSL marks these
|
||||||
|
certs as invalid when mbedtls did not.
|
||||||
|
Many thanks to guidovranken who found this issue via differential fuzzing
|
||||||
|
and reported it in #3629.
|
||||||
|
* Zeroising of local buffers and variables which are used for calculations
|
||||||
|
in mbedtls_pkcs5_pbkdf2_hmac(), mbedtls_internal_sha*_process(),
|
||||||
|
mbedtls_internal_md*_process() and mbedtls_internal_ripemd160_process()
|
||||||
|
functions to erase sensitive data from memory. Reported by
|
||||||
|
Johan Malmgren and Johan Uppman Bruce from Sectra.
|
||||||
|
|
||||||
|
Bugfix
|
||||||
|
* Fix an invalid (but nonzero) return code from mbedtls_pk_parse_subpubkey()
|
||||||
|
when the input has trailing garbage. Fixes #2512.
|
||||||
|
* Fix rsa_prepare_blinding() to retry when the blinding value is not
|
||||||
|
invertible (mod N), instead of returning MBEDTLS_ERR_RSA_RNG_FAILED. This
|
||||||
|
addresses a regression but is rare in practice (approx. 1 in 2/sqrt(N)).
|
||||||
|
Found by Synopsys Coverity, fix contributed by Peter Kolbus (Garmin).
|
||||||
|
Fixes #3647.
|
||||||
|
* Fix the build when the macro _GNU_SOURCE is defined to a non-empty value.
|
||||||
|
Fix #3432.
|
||||||
|
* Correct the default IV size for mbedtls_cipher_info_t structures using
|
||||||
|
MBEDTLS_MODE_ECB to 0, since ECB mode ciphers don't use IVs.
|
||||||
|
* Make arc4random_buf available on NetBSD and OpenBSD when _POSIX_C_SOURCE is
|
||||||
|
defined. Fix contributed in #3571. Adopted for LTS branch 2.16 in #3602.
|
||||||
|
* Fix build failures on GCC 11. Fixes #3782.
|
||||||
|
* Fix a memory leak in mbedtls_mpi_sub_abs() when the result was negative
|
||||||
|
(an error condition) and the second operand was aliased to the result.
|
||||||
|
* Fix a case in elliptic curve arithmetic where an out-of-memory condition
|
||||||
|
could go undetected, resulting in an incorrect result.
|
||||||
|
* In CTR_DRBG and HMAC_DRBG, don't reset the reseed interval in seed().
|
||||||
|
Fixes #2927.
|
||||||
|
* In PEM writing functions, fill the trailing part of the buffer with null
|
||||||
|
bytes. This guarantees that the corresponding parsing function can read
|
||||||
|
the buffer back, which was the case for mbedtls_x509write_{crt,csr}_pem
|
||||||
|
until this property was inadvertently broken in Mbed TLS 2.19.0.
|
||||||
|
Fixes #3682.
|
||||||
|
* Fix a build failure that occurred with the MBEDTLS_AES_SETKEY_DEC_ALT
|
||||||
|
option on. In this configuration key management methods that are required
|
||||||
|
for MBEDTLS_CIPHER_MODE_XTS were excluded from the build and made it fail.
|
||||||
|
Fixes #3818. Reported by John Stroebel.
|
||||||
|
|
||||||
|
Changes
|
||||||
|
* Reduce stack usage significantly during sliding window exponentiation.
|
||||||
|
Reported in #3591 and fix contributed in #3592 by Daniel Otte.
|
||||||
|
* Remove the zeroization of a pointer variable in AES rounds. It was valid
|
||||||
|
but spurious and misleading since it looked like a mistaken attempt to
|
||||||
|
zeroize the pointed-to buffer. Reported by Antonio de la Piedra, CEA
|
||||||
|
Leti, France.
|
||||||
|
|
||||||
|
= mbed TLS 2.16.8 branch released 2020-09-01
|
||||||
|
|
||||||
|
Features
|
||||||
|
* Support building on e2k (Elbrus) architecture: correctly enable
|
||||||
|
-Wformat-signedness, and fix the code that causes signed-one-bit-field
|
||||||
|
and sign-compare warnings. Contributed by makise-homura (Igor Molchanov)
|
||||||
|
<akemi_homura@kurisa.ch>.
|
||||||
|
|
||||||
|
Security
|
||||||
|
* When checking X.509 CRLs, a certificate was only considered as revoked if
|
||||||
|
its revocationDate was in the past according to the local clock if
|
||||||
|
available. In particular, on builds without MBEDTLS_HAVE_TIME_DATE,
|
||||||
|
certificates were never considered as revoked. On builds with
|
||||||
|
MBEDTLS_HAVE_TIME_DATE, an attacker able to control the local clock (for
|
||||||
|
example, an untrusted OS attacking a secure enclave) could prevent
|
||||||
|
revocation of certificates via CRLs. Fixed by no longer checking the
|
||||||
|
revocationDate field, in accordance with RFC 5280. Reported by
|
||||||
|
yuemonangong in #3340. Reported independently and fixed by
|
||||||
|
Raoul Strackx and Jethro Beekman in #3433.
|
||||||
|
* In (D)TLS record decryption, when using a CBC ciphersuites without the
|
||||||
|
Encrypt-then-Mac extension, use constant code flow memory access patterns
|
||||||
|
to extract and check the MAC. This is an improvement to the existing
|
||||||
|
countermeasure against Lucky 13 attacks. The previous countermeasure was
|
||||||
|
effective against network-based attackers, but less so against local
|
||||||
|
attackers. The new countermeasure defends against local attackers, even
|
||||||
|
if they have access to fine-grained measurements. In particular, this
|
||||||
|
fixes a local Lucky 13 cache attack found and reported by Tuba Yavuz,
|
||||||
|
Farhaan Fowze, Ken (Yihan) Bai, Grant Hernandez, and Kevin Butler
|
||||||
|
(University of Florida) and Dave Tian (Purdue University).
|
||||||
|
* Fix side channel in RSA private key operations and static (finite-field)
|
||||||
|
Diffie-Hellman. An adversary with precise enough timing and memory access
|
||||||
|
information (typically an untrusted operating system attacking a secure
|
||||||
|
enclave) could bypass an existing counter-measure (base blinding) and
|
||||||
|
potentially fully recover the private key.
|
||||||
|
* Fix a 1-byte buffer overread in mbedtls_x509_crl_parse_der().
|
||||||
|
Credit to OSS-Fuzz for detecting the problem and to Philippe Antoine
|
||||||
|
for pinpointing the problematic code.
|
||||||
|
* Zeroising of plaintext buffers in mbedtls_ssl_read() to erase unused
|
||||||
|
application data from memory. Reported in #689 by
|
||||||
|
Johan Uppman Bruce of Sectra.
|
||||||
|
|
||||||
|
Bugfix
|
||||||
|
* Avoid use of statically sized stack buffers for certificate writing.
|
||||||
|
This previously limited the maximum size of DER encoded certificates
|
||||||
|
in mbedtls_x509write_crt_der() to 2Kb. Reported by soccerGB in #2631.
|
||||||
|
* Reduce the stack consumption of mbedtls_x509write_csr_der() which
|
||||||
|
previously could lead to stack overflow on constrained devices.
|
||||||
|
Contributed by Doru Gucea and Simon Leet in #3464.
|
||||||
|
* Use arc4random_buf on NetBSD instead of rand implementation with cyclical
|
||||||
|
lower bits. Fix contributed in #3540.
|
||||||
|
* Fix building library/net_sockets.c and the ssl_mail_client program on
|
||||||
|
NetBSD. NetBSD conditionals were added for the backport to avoid the risk
|
||||||
|
of breaking a platform. Original fix contributed by Nia Alarie in #3422.
|
||||||
|
Adapted for long-term support branch 2.16 in #3558.
|
||||||
|
* Fix bug in redirection of unit test outputs on platforms where stdout is
|
||||||
|
defined as a macro. First reported in #2311 and fix contributed in #3528.
|
||||||
|
Adopted for LTS branch 2.16 in #3601.
|
||||||
|
|
||||||
|
Changes
|
||||||
|
* Update copyright notices to use Linux Foundation guidance. As a result,
|
||||||
|
the copyright of contributors other than Arm is now acknowledged, and the
|
||||||
|
years of publishing are no longer tracked in the source files. This also
|
||||||
|
eliminates the need for the lines declaring the files to be part of
|
||||||
|
MbedTLS. Fixes #3457.
|
||||||
|
|
||||||
|
= mbed TLS 2.16.7 branch released 2020-07-01
|
||||||
|
|
||||||
|
Security
|
||||||
|
* Fix a side channel vulnerability in modular exponentiation that could
|
||||||
|
reveal an RSA private key used in a secure enclave. Noticed by Sangho Lee,
|
||||||
|
Ming-Wei Shih, Prasun Gera, Taesoo Kim and Hyesoon Kim (Georgia Institute
|
||||||
|
of Technology); and Marcus Peinado (Microsoft Research). Reported by Raoul
|
||||||
|
Strackx (Fortanix) in #3394.
|
||||||
|
* Fix side channel in mbedtls_ecp_check_pub_priv() and
|
||||||
|
mbedtls_pk_parse_key() / mbedtls_pk_parse_keyfile() (when loading a
|
||||||
|
private key that didn't include the uncompressed public key), as well as
|
||||||
|
mbedtls_ecp_mul() / mbedtls_ecp_mul_restartable() when called with a NULL
|
||||||
|
f_rng argument. An attacker with access to precise enough timing and
|
||||||
|
memory access information (typically an untrusted operating system
|
||||||
|
attacking a secure enclave) could fully recover the ECC private key.
|
||||||
|
Found and reported by Alejandro Cabrera Aldaya and Billy Brumley.
|
||||||
|
* Fix issue in Lucky 13 counter-measure that could make it ineffective when
|
||||||
|
hardware accelerators were used (using one of the MBEDTLS_SHAxxx_ALT
|
||||||
|
macros). This would cause the original Lucky 13 attack to be possible in
|
||||||
|
those configurations, allowing an active network attacker to recover
|
||||||
|
plaintext after repeated timing measurements under some conditions.
|
||||||
|
Reported and fix suggested by Luc Perneel in #3246.
|
||||||
|
|
||||||
|
Bugfix
|
||||||
|
* Fix the Visual Studio Release x64 build configuration for mbedtls itself.
|
||||||
|
Completes a previous fix in Mbed TLS 2.16.3 that only fixed the build for
|
||||||
|
the example programs. Reported in #1430 and fix contributed by irwir.
|
||||||
|
* Fix undefined behavior in X.509 certificate parsing if the
|
||||||
|
pathLenConstraint basic constraint value is equal to INT_MAX.
|
||||||
|
The actual effect with almost every compiler is the intended
|
||||||
|
behavior, so this is unlikely to be exploitable anywhere. #3197
|
||||||
|
* Include asn1.h in error.c. Fixes #3328 reported by David Hu.
|
||||||
|
* Fix potential memory leaks in ecp_randomize_jac() and ecp_randomize_mxz()
|
||||||
|
when PRNG function fails. Contributed by Jonas Lejeune in #3318.
|
||||||
|
* Add additional bounds checks in ssl_write_client_hello() preventing
|
||||||
|
output buffer overflow if the configuration declared a buffer that was
|
||||||
|
too small.
|
||||||
|
|
||||||
|
Changes
|
||||||
|
* Unify the example programs termination to call mbedtls_exit() instead of
|
||||||
|
using a return command. This has been done to enable customization of the
|
||||||
|
behavior in bare metal environments.
|
||||||
|
* Abort the ClientHello writing function as soon as some extension doesn't
|
||||||
|
fit into the record buffer. Previously, such extensions were silently
|
||||||
|
dropped. As a consequence, the TLS handshake now fails when the output
|
||||||
|
buffer is not large enough to hold the ClientHello.
|
||||||
|
* The ECP module, enabled by `MBEDTLS_ECP_C`, now depends on
|
||||||
|
`MBEDTLS_CTR_DRBG_C`, `MBEDTLS_HMAC_DRBG_C`, `MBEDTLS_SHA512_C` or
|
||||||
|
`MBEDTLS_SHA256_C` for some side-channel coutermeasures. If side channels
|
||||||
|
are not a concern, this dependency can be avoided by enabling the new
|
||||||
|
option `MBEDTLS_ECP_NO_INTERNAL_RNG`.
|
||||||
|
|
||||||
= mbed TLS 2.16.6 branch released 2020-04-14
|
= mbed TLS 2.16.6 branch released 2020-04-14
|
||||||
|
|
||||||
Security
|
Security
|
||||||
|
|
88
ChangeLog.d/00README.md
Normal file
88
ChangeLog.d/00README.md
Normal file
|
@ -0,0 +1,88 @@
|
||||||
|
# Pending changelog entry directory
|
||||||
|
|
||||||
|
This directory contains changelog entries that have not yet been merged
|
||||||
|
to the changelog file ([`../ChangeLog`](../ChangeLog)).
|
||||||
|
|
||||||
|
## What requires a changelog entry?
|
||||||
|
|
||||||
|
Write a changelog entry if there is a user-visible change. This includes:
|
||||||
|
|
||||||
|
* Bug fixes in the library or in sample programs: fixing a security hole,
|
||||||
|
fixing broken behavior, fixing the build in some configuration or on some
|
||||||
|
platform, etc.
|
||||||
|
* New features in the library, new sample programs, or new platform support.
|
||||||
|
* Changes in existing behavior. These should be rare. Changes in features
|
||||||
|
that are documented as experimental may or may not be announced, depending
|
||||||
|
on the extent of the change and how widely we expect the feature to be used.
|
||||||
|
|
||||||
|
We generally don't include changelog entries for:
|
||||||
|
|
||||||
|
* Documentation improvements.
|
||||||
|
* Performance improvements, unless they are particularly significant.
|
||||||
|
* Changes to parts of the code base that users don't interact with directly,
|
||||||
|
such as test code and test data.
|
||||||
|
|
||||||
|
Until Mbed TLS 2.16.8, we required changelog entries in more cases.
|
||||||
|
Looking at older changelog entries is good practice for how to write a
|
||||||
|
changelog entry, but not for deciding whether to write one.
|
||||||
|
|
||||||
|
## Changelog entry file format
|
||||||
|
|
||||||
|
A changelog entry file must have the extension `*.txt` and must have the
|
||||||
|
following format:
|
||||||
|
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
Security
|
||||||
|
* Change description.
|
||||||
|
* Another change description.
|
||||||
|
|
||||||
|
Features
|
||||||
|
* Yet another change description. This is a long change description that
|
||||||
|
spans multiple lines.
|
||||||
|
* Yet again another change description.
|
||||||
|
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
The permitted changelog entry categories are as follows:
|
||||||
|
<!-- Keep this synchronized with STANDARD_CATEGORIES in assemble_changelog.py! -->
|
||||||
|
|
||||||
|
API changes
|
||||||
|
Default behavior changes
|
||||||
|
Requirement changes
|
||||||
|
New deprecations
|
||||||
|
Removals
|
||||||
|
Features
|
||||||
|
Security
|
||||||
|
Bugfix
|
||||||
|
Changes
|
||||||
|
|
||||||
|
Use “Changes” for anything that doesn't fit in the other categories.
|
||||||
|
|
||||||
|
## How to write a changelog entry
|
||||||
|
|
||||||
|
Each entry starts with three spaces, an asterisk and a space. Continuation
|
||||||
|
lines start with 5 spaces. Lines wrap at 79 characters.
|
||||||
|
|
||||||
|
Write full English sentences with proper capitalization and punctuation. Use
|
||||||
|
the present tense. Use the imperative where applicable. For example: “Fix a
|
||||||
|
bug in mbedtls_xxx() ….”
|
||||||
|
|
||||||
|
Include GitHub issue numbers where relevant. Use the format “#1234” for an
|
||||||
|
Mbed TLS issue. Add other external references such as CVE numbers where
|
||||||
|
applicable.
|
||||||
|
|
||||||
|
Credit bug reporters where applicable.
|
||||||
|
|
||||||
|
**Explain why, not how**. Remember that the audience is the users of the
|
||||||
|
library, not its developers. In particular, for a bug fix, explain the
|
||||||
|
consequences of the bug, not how the bug was fixed. For a new feature, explain
|
||||||
|
why one might be interested in the feature. For an API change or a deprecation,
|
||||||
|
explain how to update existing applications.
|
||||||
|
|
||||||
|
See [existing entries](../ChangeLog) for examples.
|
||||||
|
|
||||||
|
## How `ChangeLog` is updated
|
||||||
|
|
||||||
|
Run [`../scripts/assemble_changelog.py`](../scripts/assemble_changelog.py)
|
||||||
|
from a Git working copy
|
||||||
|
to move the entries from files in `ChangeLog.d` to the main `ChangeLog` file.
|
3
ChangeLog.d/add-missing-parenthesis.txt
Normal file
3
ChangeLog.d/add-missing-parenthesis.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Bugfix
|
||||||
|
* Fix a compilation error when MBEDTLS_ECP_RANDOMIZE_MXZ_ALT is
|
||||||
|
defined. Fixes #4217.
|
3
ChangeLog.d/aescrypt2.txt
Normal file
3
ChangeLog.d/aescrypt2.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Changes
|
||||||
|
* Remove the AES sample application programs/aes/aescrypt2 which shows
|
||||||
|
bad cryptographic practice. Fix #1906.
|
5
ChangeLog.d/bugfix_PR3616.txt
Normal file
5
ChangeLog.d/bugfix_PR3616.txt
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
Bugfix
|
||||||
|
* Fix premature fopen() call in mbedtls_entropy_write_seed_file which may
|
||||||
|
lead to the seed file corruption in case if the path to the seed file is
|
||||||
|
equal to MBEDTLS_PLATFORM_STD_NV_SEED_FILE. Contributed by Victor
|
||||||
|
Krasnoshchok in #3616.
|
4
ChangeLog.d/dhm_min_bitlen.txt
Normal file
4
ChangeLog.d/dhm_min_bitlen.txt
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
Bugfix
|
||||||
|
* In a TLS client, enforce the Diffie-Hellman minimum parameter size
|
||||||
|
set with mbedtls_ssl_conf_dhm_min_bitlen() precisely. Before, the
|
||||||
|
minimum size was rounded down to the nearest multiple of 8.
|
2
ChangeLog.d/dtls_sample_use_read_timeout.txt
Normal file
2
ChangeLog.d/dtls_sample_use_read_timeout.txt
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
Changes
|
||||||
|
* Fix the setting of the read timeout in the DTLS sample programs.
|
2
ChangeLog.d/fix-pk-parse-key-error-code.txt
Normal file
2
ChangeLog.d/fix-pk-parse-key-error-code.txt
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
Bugfix
|
||||||
|
* Fix an incorrect error code when parsing a PKCS#8 private key.
|
3
ChangeLog.d/mpi_read_negative_zero.txt
Normal file
3
ChangeLog.d/mpi_read_negative_zero.txt
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Bugfix
|
||||||
|
* mbedtls_mpi_read_string on "-0" produced an MPI object that was not treated
|
||||||
|
as equal to 0 in all cases. Fix it to produce the same object as "0".
|
7
LICENSE
7
LICENSE
|
@ -1,2 +1,5 @@
|
||||||
Unless specifically indicated otherwise in a file, files are licensed
|
Unless specifically indicated otherwise in a file, Mbed TLS files are provided
|
||||||
under the Apache 2.0 license, as can be found in: apache-2.0.txt
|
under the Apache License 2.0, or the GNU General Public License v2.0 or later
|
||||||
|
(SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later).
|
||||||
|
|
||||||
|
A copy of these licenses can be found in apache-2.0.txt and gpl-2.0.txt
|
||||||
|
|
17
Makefile
17
Makefile
|
@ -106,11 +106,11 @@ covtest:
|
||||||
lcov:
|
lcov:
|
||||||
rm -rf Coverage
|
rm -rf Coverage
|
||||||
lcov --capture --initial --directory library -o files.info
|
lcov --capture --initial --directory library -o files.info
|
||||||
lcov --capture --directory library -o tests.info
|
lcov --rc lcov_branch_coverage=1 --capture --directory library -o tests.info
|
||||||
lcov --add-tracefile files.info --add-tracefile tests.info -o all.info
|
lcov --rc lcov_branch_coverage=1 --add-tracefile files.info --add-tracefile tests.info -o all.info
|
||||||
lcov --remove all.info -o final.info '*.h'
|
lcov --rc lcov_branch_coverage=1 --remove all.info -o final.info '*.h'
|
||||||
gendesc tests/Descriptions.txt -o descriptions
|
gendesc tests/Descriptions.txt -o descriptions
|
||||||
genhtml --title "mbed TLS" --description-file descriptions --keep-descriptions --legend --no-branch-coverage -o Coverage final.info
|
genhtml --title "mbed TLS" --description-file descriptions --keep-descriptions --legend --branch-coverage -o Coverage final.info
|
||||||
rm -f files.info tests.info all.info final.info descriptions
|
rm -f files.info tests.info all.info final.info descriptions
|
||||||
|
|
||||||
apidoc:
|
apidoc:
|
||||||
|
@ -124,10 +124,15 @@ endif
|
||||||
## Editor navigation files
|
## Editor navigation files
|
||||||
C_SOURCE_FILES = $(wildcard include/*/*.h library/*.[hc] programs/*/*.[hc] tests/suites/*.function)
|
C_SOURCE_FILES = $(wildcard include/*/*.h library/*.[hc] programs/*/*.[hc] tests/suites/*.function)
|
||||||
# Exuberant-ctags invocation. Other ctags implementations may require different options.
|
# Exuberant-ctags invocation. Other ctags implementations may require different options.
|
||||||
CTAGS = ctags --langmap=c:+.h.function -o
|
CTAGS = ctags --langmap=c:+.h.function --line-directives=no -o
|
||||||
tags: $(C_SOURCE_FILES)
|
tags: $(C_SOURCE_FILES)
|
||||||
$(CTAGS) $@ $(C_SOURCE_FILES)
|
$(CTAGS) $@ $(C_SOURCE_FILES)
|
||||||
TAGS: $(C_SOURCE_FILES)
|
TAGS: $(C_SOURCE_FILES)
|
||||||
etags -o $@ $(C_SOURCE_FILES)
|
etags --no-line-directive -o $@ $(C_SOURCE_FILES)
|
||||||
|
global: GPATH GRTAGS GSYMS GTAGS
|
||||||
GPATH GRTAGS GSYMS GTAGS: $(C_SOURCE_FILES)
|
GPATH GRTAGS GSYMS GTAGS: $(C_SOURCE_FILES)
|
||||||
ls $(C_SOURCE_FILES) | gtags -f - --gtagsconf .globalrc
|
ls $(C_SOURCE_FILES) | gtags -f - --gtagsconf .globalrc
|
||||||
|
cscope: cscope.in.out cscope.po.out cscope.out
|
||||||
|
cscope.in.out cscope.po.out cscope.out: $(C_SOURCE_FILES)
|
||||||
|
cscope -bq -u -Iinclude -Ilibrary $(patsubst %,-I%,$(wildcard 3rdparty/*/include)) -Itests/include $(C_SOURCE_FILES)
|
||||||
|
.PHONY: cscope global
|
||||||
|
|
|
@ -172,7 +172,7 @@ Mbed TLS can be ported to many different architectures, OS's and platforms. Befo
|
||||||
License
|
License
|
||||||
-------
|
-------
|
||||||
|
|
||||||
Unless specifically indicated otherwise in a file, Mbed TLS files are provided under the [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) license. See [here](./apache-2.0.txt) for the full text of this license. Contributors must accept that their contributions are made under both the Apache-2.0 AND [GPL-2.0-or-later](https://spdx.org/licenses/GPL-2.0-or-later.html) licenses. This enables LTS (Long Term Support) branches of the software to be provided under either the Apache-2.0 OR GPL-2.0-or-later licenses.
|
Unless specifically indicated otherwise in a file, Mbed TLS files are provided under the [Apache-2.0](https://spdx.org/licenses/Apache-2.0.html) OR [GPL-2.0-or-later](https://spdx.org/licenses/GPL-2.0-or-later.html) licenses. A copy of these licenses can be found in [apache-2.0.txt](./apache-2.0.txt) and [gpl-2.0.txt](./gpl-2.0.txt). Contributors must accept that their contributions are made under both the Apache-2.0 AND GPL-2.0-or-later licenses.
|
||||||
|
|
||||||
Contributing
|
Contributing
|
||||||
------------
|
------------
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief Minimal configuration for TLS 1.2 with PSK and AES-CCM ciphersuites
|
* \brief Minimal configuration for TLS 1.2 with PSK and AES-CCM ciphersuites
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Minimal configuration for TLS 1.2 with PSK and AES-CCM ciphersuites
|
* Minimal configuration for TLS 1.2 with PSK and AES-CCM ciphersuites
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief Minimal configuration for TLS 1.1 (RFC 4346)
|
* \brief Minimal configuration for TLS 1.1 (RFC 4346)
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Minimal configuration for TLS 1.1 (RFC 4346), implementing only the
|
* Minimal configuration for TLS 1.1 (RFC 4346), implementing only the
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief Minimal configuration of features that do not require an entropy source
|
* \brief Minimal configuration of features that do not require an entropy source
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2016, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Minimal configuration of features that do not require an entropy source
|
* Minimal configuration of features that do not require an entropy source
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief Minimal configuration for TLS NSA Suite B Profile (RFC 6460)
|
* \brief Minimal configuration for TLS NSA Suite B Profile (RFC 6460)
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Minimal configuration for TLS NSA Suite B Profile (RFC 6460)
|
* Minimal configuration for TLS NSA Suite B Profile (RFC 6460)
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief Minimal configuration for using TLS as part of Thread
|
* \brief Minimal configuration for using TLS as part of Thread
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -5,8 +5,14 @@
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -20,7 +26,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -5,8 +5,14 @@
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -20,7 +26,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -5,8 +5,14 @@
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -20,11 +26,30 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @mainpage mbed TLS v2.16.6 source code documentation
|
* @mainpage mbed TLS v2.16.10 source code documentation
|
||||||
*
|
*
|
||||||
* This documentation describes the internal structure of mbed TLS. It was
|
* This documentation describes the internal structure of mbed TLS. It was
|
||||||
* automatically generated from specially formatted comment blocks in
|
* automatically generated from specially formatted comment blocks in
|
||||||
|
|
|
@ -5,8 +5,14 @@
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -20,7 +26,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -5,8 +5,14 @@
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -20,7 +26,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -5,8 +5,14 @@
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -20,7 +26,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -5,8 +5,14 @@
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -20,7 +26,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -28,7 +28,7 @@ DOXYFILE_ENCODING = UTF-8
|
||||||
# identify the project. Note that if you do not use Doxywizard you need
|
# identify the project. Note that if you do not use Doxywizard you need
|
||||||
# to put quotes around the project name if it contains spaces.
|
# to put quotes around the project name if it contains spaces.
|
||||||
|
|
||||||
PROJECT_NAME = "mbed TLS v2.16.6"
|
PROJECT_NAME = "mbed TLS v2.16.10"
|
||||||
|
|
||||||
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
|
# The PROJECT_NUMBER tag can be used to enter a project or revision number.
|
||||||
# This could be handy for archiving the generated documentation or
|
# This could be handy for archiving the generated documentation or
|
||||||
|
|
339
gpl-2.0.txt
Normal file
339
gpl-2.0.txt
Normal file
|
@ -0,0 +1,339 @@
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 2, June 1991
|
||||||
|
|
||||||
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
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
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
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".
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
a) You must cause the modified files to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.)
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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) 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,
|
||||||
|
|
||||||
|
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,
|
||||||
|
|
||||||
|
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 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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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
|
||||||
|
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
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest 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
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
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
|
||||||
|
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
|
||||||
|
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.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License along
|
||||||
|
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
Gnomovision version 69, Copyright (C) year name of author
|
||||||
|
Gnomovision 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.
|
||||||
|
|
||||||
|
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:
|
||||||
|
|
||||||
|
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.
|
|
@ -20,8 +20,15 @@
|
||||||
* <https://ieeexplore.ieee.org/servlet/opac?punumber=4375278>.
|
* <https://ieeexplore.ieee.org/servlet/opac?punumber=4375278>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved.
|
/*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* Copyright The Mbed TLS Contributors
|
||||||
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -35,7 +42,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_AES_H
|
#ifndef MBEDTLS_AES_H
|
||||||
|
|
|
@ -7,8 +7,14 @@
|
||||||
* functions; you must not call them directly.
|
* functions; you must not call them directly.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -22,7 +28,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_AESNI_H
|
#ifndef MBEDTLS_AESNI_H
|
||||||
#define MBEDTLS_AESNI_H
|
#define MBEDTLS_AESNI_H
|
||||||
|
|
|
@ -7,8 +7,14 @@
|
||||||
* security risk. We recommend considering stronger ciphers instead.
|
* security risk. We recommend considering stronger ciphers instead.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -22,7 +28,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_ARC4_H
|
#ifndef MBEDTLS_ARC4_H
|
||||||
|
|
|
@ -9,8 +9,15 @@
|
||||||
* Korean, but see http://210.104.33.10/ARIA/index-e.html in English)
|
* Korean, but see http://210.104.33.10/ARIA/index-e.html in English)
|
||||||
* and also described by the IETF in <em>RFC 5794</em>.
|
* and also described by the IETF in <em>RFC 5794</em>.
|
||||||
*/
|
*/
|
||||||
/* Copyright (C) 2006-2018, ARM Limited, All Rights Reserved
|
/*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* Copyright The Mbed TLS Contributors
|
||||||
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -24,7 +31,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_ARIA_H
|
#ifndef MBEDTLS_ARIA_H
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief Generic ASN.1 parsing
|
* \brief Generic ASN.1 parsing
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_ASN1_H
|
#ifndef MBEDTLS_ASN1_H
|
||||||
#define MBEDTLS_ASN1_H
|
#define MBEDTLS_ASN1_H
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief ASN.1 buffer writing functionality
|
* \brief ASN.1 buffer writing functionality
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_ASN1_WRITE_H
|
#ifndef MBEDTLS_ASN1_WRITE_H
|
||||||
#define MBEDTLS_ASN1_WRITE_H
|
#define MBEDTLS_ASN1_WRITE_H
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief RFC 1521 base64 encoding/decoding
|
* \brief RFC 1521 base64 encoding/decoding
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_BASE64_H
|
#ifndef MBEDTLS_BASE64_H
|
||||||
#define MBEDTLS_BASE64_H
|
#define MBEDTLS_BASE64_H
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief Multi-precision integer library
|
* \brief Multi-precision integer library
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_BIGNUM_H
|
#ifndef MBEDTLS_BIGNUM_H
|
||||||
#define MBEDTLS_BIGNUM_H
|
#define MBEDTLS_BIGNUM_H
|
||||||
|
@ -63,12 +88,12 @@
|
||||||
* Maximum window size used for modular exponentiation. Default: 6
|
* Maximum window size used for modular exponentiation. Default: 6
|
||||||
* Minimum value: 1. Maximum value: 6.
|
* Minimum value: 1. Maximum value: 6.
|
||||||
*
|
*
|
||||||
* Result is an array of ( 2 << MBEDTLS_MPI_WINDOW_SIZE ) MPIs used
|
* Result is an array of ( 2 ** MBEDTLS_MPI_WINDOW_SIZE ) MPIs used
|
||||||
* for the sliding window calculation. (So 64 by default)
|
* for the sliding window calculation. (So 64 by default)
|
||||||
*
|
*
|
||||||
* Reduction in size, reduces speed.
|
* Reduction in size, reduces speed.
|
||||||
*/
|
*/
|
||||||
#define MBEDTLS_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
|
#define MBEDTLS_MPI_WINDOW_SIZE 6 /**< Maximum window size used. */
|
||||||
#endif /* !MBEDTLS_MPI_WINDOW_SIZE */
|
#endif /* !MBEDTLS_MPI_WINDOW_SIZE */
|
||||||
|
|
||||||
#if !defined(MBEDTLS_MPI_MAX_SIZE)
|
#if !defined(MBEDTLS_MPI_MAX_SIZE)
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief Blowfish block cipher
|
* \brief Blowfish block cipher
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_BLOWFISH_H
|
#ifndef MBEDTLS_BLOWFISH_H
|
||||||
#define MBEDTLS_BLOWFISH_H
|
#define MBEDTLS_BLOWFISH_H
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief Multi-precision integer library
|
* \brief Multi-precision integer library
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Multiply source vector [s] with b, add result
|
* Multiply source vector [s] with b, add result
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief Camellia block cipher
|
* \brief Camellia block cipher
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_CAMELLIA_H
|
#ifndef MBEDTLS_CAMELLIA_H
|
||||||
#define MBEDTLS_CAMELLIA_H
|
#define MBEDTLS_CAMELLIA_H
|
||||||
|
|
|
@ -28,8 +28,14 @@
|
||||||
* consistent with RFC 3610.
|
* consistent with RFC 3610.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -43,7 +49,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_CCM_H
|
#ifndef MBEDTLS_CCM_H
|
||||||
|
@ -150,7 +175,7 @@ void mbedtls_ccm_free( mbedtls_ccm_context *ctx );
|
||||||
* than zero, \p output must be a writable buffer of at least
|
* than zero, \p output must be a writable buffer of at least
|
||||||
* that length.
|
* that length.
|
||||||
* \param tag The buffer holding the authentication field. This must be a
|
* \param tag The buffer holding the authentication field. This must be a
|
||||||
* readable buffer of at least \p tag_len Bytes.
|
* writable buffer of at least \p tag_len Bytes.
|
||||||
* \param tag_len The length of the authentication field to generate in Bytes:
|
* \param tag_len The length of the authentication field to generate in Bytes:
|
||||||
* 4, 6, 8, 10, 12, 14 or 16.
|
* 4, 6, 8, 10, 12, 14 or 16.
|
||||||
*
|
*
|
||||||
|
@ -195,7 +220,7 @@ int mbedtls_ccm_encrypt_and_tag( mbedtls_ccm_context *ctx, size_t length,
|
||||||
* than zero, \p output must be a writable buffer of at least
|
* than zero, \p output must be a writable buffer of at least
|
||||||
* that length.
|
* that length.
|
||||||
* \param tag The buffer holding the authentication field. This must be a
|
* \param tag The buffer holding the authentication field. This must be a
|
||||||
* readable buffer of at least \p tag_len Bytes.
|
* writable buffer of at least \p tag_len Bytes.
|
||||||
* \param tag_len The length of the authentication field to generate in Bytes:
|
* \param tag_len The length of the authentication field to generate in Bytes:
|
||||||
* 0, 4, 6, 8, 10, 12, 14 or 16.
|
* 0, 4, 6, 8, 10, 12, 14 or 16.
|
||||||
*
|
*
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief Sample certificates and DHM parameters for testing
|
* \brief Sample certificates and DHM parameters for testing
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_CERTS_H
|
#ifndef MBEDTLS_CERTS_H
|
||||||
#define MBEDTLS_CERTS_H
|
#define MBEDTLS_CERTS_H
|
||||||
|
|
|
@ -12,8 +12,15 @@
|
||||||
* \author Daniel King <damaki.gh@gmail.com>
|
* \author Daniel King <damaki.gh@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved.
|
/*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* Copyright The Mbed TLS Contributors
|
||||||
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -27,7 +34,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_CHACHA20_H
|
#ifndef MBEDTLS_CHACHA20_H
|
||||||
|
|
|
@ -12,8 +12,15 @@
|
||||||
* \author Daniel King <damaki.gh@gmail.com>
|
* \author Daniel King <damaki.gh@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved.
|
/*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* Copyright The Mbed TLS Contributors
|
||||||
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -27,7 +34,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_CHACHAPOLY_H
|
#ifndef MBEDTLS_CHACHAPOLY_H
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief Consistency checks for configuration options
|
* \brief Consistency checks for configuration options
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2018, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -140,6 +165,16 @@
|
||||||
#error "MBEDTLS_ECP_C defined, but not all prerequisites"
|
#error "MBEDTLS_ECP_C defined, but not all prerequisites"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_ECP_C) && !( \
|
||||||
|
defined(MBEDTLS_ECP_ALT) || \
|
||||||
|
defined(MBEDTLS_CTR_DRBG_C) || \
|
||||||
|
defined(MBEDTLS_HMAC_DRBG_C) || \
|
||||||
|
defined(MBEDTLS_SHA512_C) || \
|
||||||
|
defined(MBEDTLS_SHA256_C) || \
|
||||||
|
defined(MBEDTLS_ECP_NO_INTERNAL_RNG))
|
||||||
|
#error "MBEDTLS_ECP_C requires a DRBG or SHA-2 module unless MBEDTLS_ECP_NO_INTERNAL_RNG is defined or an alternative implementation is used"
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(MBEDTLS_PK_PARSE_C) && !defined(MBEDTLS_ASN1_PARSE_C)
|
#if defined(MBEDTLS_PK_PARSE_C) && !defined(MBEDTLS_ASN1_PARSE_C)
|
||||||
#error "MBEDTLS_PK_PARSE_C defined, but not all prerequesites"
|
#error "MBEDTLS_PK_PARSE_C defined, but not all prerequesites"
|
||||||
#endif
|
#endif
|
||||||
|
@ -162,6 +197,16 @@
|
||||||
#error "MBEDTLS_ENTROPY_FORCE_SHA256 defined, but not all prerequisites"
|
#error "MBEDTLS_ENTROPY_FORCE_SHA256 defined, but not all prerequisites"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__has_feature)
|
||||||
|
#if __has_feature(memory_sanitizer)
|
||||||
|
#define MBEDTLS_HAS_MEMSAN
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#if defined(MBEDTLS_TEST_CONSTANT_FLOW_MEMSAN) && !defined(MBEDTLS_HAS_MEMSAN)
|
||||||
|
#error "MBEDTLS_TEST_CONSTANT_FLOW_MEMSAN requires building with MemorySanitizer"
|
||||||
|
#endif
|
||||||
|
#undef MBEDTLS_HAS_MEMSAN
|
||||||
|
|
||||||
#if defined(MBEDTLS_TEST_NULL_ENTROPY) && \
|
#if defined(MBEDTLS_TEST_NULL_ENTROPY) && \
|
||||||
( !defined(MBEDTLS_ENTROPY_C) || !defined(MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES) )
|
( !defined(MBEDTLS_ENTROPY_C) || !defined(MBEDTLS_NO_DEFAULT_ENTROPY_SOURCES) )
|
||||||
#error "MBEDTLS_TEST_NULL_ENTROPY defined, but not all prerequisites"
|
#error "MBEDTLS_TEST_NULL_ENTROPY defined, but not all prerequisites"
|
||||||
|
|
|
@ -8,8 +8,14 @@
|
||||||
* \author Adriaan de Jong <dejong@fox-it.com>
|
* \author Adriaan de Jong <dejong@fox-it.com>
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -23,7 +29,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_CIPHER_H
|
#ifndef MBEDTLS_CIPHER_H
|
||||||
|
|
|
@ -6,8 +6,14 @@
|
||||||
* \author Adriaan de Jong <dejong@fox-it.com>
|
* \author Adriaan de Jong <dejong@fox-it.com>
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -21,7 +27,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_CIPHER_WRAP_H
|
#ifndef MBEDTLS_CIPHER_WRAP_H
|
||||||
#define MBEDTLS_CIPHER_WRAP_H
|
#define MBEDTLS_CIPHER_WRAP_H
|
||||||
|
|
|
@ -7,8 +7,14 @@
|
||||||
* Authentication is defined in <em>RFC-4493: The AES-CMAC Algorithm</em>.
|
* Authentication is defined in <em>RFC-4493: The AES-CMAC Algorithm</em>.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2015-2018, Arm Limited (or its affiliates), All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -22,7 +28,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_CMAC_H
|
#ifndef MBEDTLS_CMAC_H
|
||||||
|
|
|
@ -7,8 +7,14 @@
|
||||||
* \deprecated Use the new names directly instead
|
* \deprecated Use the new names directly instead
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -22,7 +28,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||||
|
|
|
@ -8,8 +8,14 @@
|
||||||
* memory footprint.
|
* memory footprint.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2018, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -23,7 +29,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_CONFIG_H
|
#ifndef MBEDTLS_CONFIG_H
|
||||||
|
@ -524,6 +549,42 @@
|
||||||
//#define MBEDTLS_ECP_RANDOMIZE_MXZ_ALT
|
//#define MBEDTLS_ECP_RANDOMIZE_MXZ_ALT
|
||||||
//#define MBEDTLS_ECP_NORMALIZE_MXZ_ALT
|
//#define MBEDTLS_ECP_NORMALIZE_MXZ_ALT
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \def MBEDTLS_TEST_CONSTANT_FLOW_MEMSAN
|
||||||
|
*
|
||||||
|
* Enable testing of the constant-flow nature of some sensitive functions with
|
||||||
|
* clang's MemorySanitizer. This causes some existing tests to also test
|
||||||
|
* this non-functional property of the code under test.
|
||||||
|
*
|
||||||
|
* This setting requires compiling with clang -fsanitize=memory. The test
|
||||||
|
* suites can then be run normally.
|
||||||
|
*
|
||||||
|
* \warning This macro is only used for extended testing; it is not considered
|
||||||
|
* part of the library's API, so it may change or disappear at any time.
|
||||||
|
*
|
||||||
|
* Uncomment to enable testing of the constant-flow nature of selected code.
|
||||||
|
*/
|
||||||
|
//#define MBEDTLS_TEST_CONSTANT_FLOW_MEMSAN
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \def MBEDTLS_TEST_CONSTANT_FLOW_VALGRIND
|
||||||
|
*
|
||||||
|
* Enable testing of the constant-flow nature of some sensitive functions with
|
||||||
|
* valgrind's memcheck tool. This causes some existing tests to also test
|
||||||
|
* this non-functional property of the code under test.
|
||||||
|
*
|
||||||
|
* This setting requires valgrind headers for building, and is only useful for
|
||||||
|
* testing if the tests suites are run with valgrind's memcheck. This can be
|
||||||
|
* done for an individual test suite with 'valgrind ./test_suite_xxx', or when
|
||||||
|
* using CMake, this can be done for all test suites with 'make memcheck'.
|
||||||
|
*
|
||||||
|
* \warning This macro is only used for extended testing; it is not considered
|
||||||
|
* part of the library's API, so it may change or disappear at any time.
|
||||||
|
*
|
||||||
|
* Uncomment to enable testing of the constant-flow nature of selected code.
|
||||||
|
*/
|
||||||
|
//#define MBEDTLS_TEST_CONSTANT_FLOW_VALGRIND
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \def MBEDTLS_TEST_NULL_ENTROPY
|
* \def MBEDTLS_TEST_NULL_ENTROPY
|
||||||
*
|
*
|
||||||
|
@ -780,6 +841,28 @@
|
||||||
*/
|
*/
|
||||||
#define MBEDTLS_ECP_NIST_OPTIM
|
#define MBEDTLS_ECP_NIST_OPTIM
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \def MBEDTLS_ECP_NO_INTERNAL_RNG
|
||||||
|
*
|
||||||
|
* When this option is disabled, mbedtls_ecp_mul() will make use of an
|
||||||
|
* internal RNG when called with a NULL \c f_rng argument, in order to protect
|
||||||
|
* against some side-channel attacks.
|
||||||
|
*
|
||||||
|
* This protection introduces a dependency of the ECP module on one of the
|
||||||
|
* DRBG or SHA modules (HMAC-DRBG, CTR-DRBG, SHA-512 or SHA-256.) For very
|
||||||
|
* constrained applications that don't require this protection (for example,
|
||||||
|
* because you're only doing signature verification, so not manipulating any
|
||||||
|
* secret, or because local/physical side-channel attacks are outside your
|
||||||
|
* threat model), it might be desirable to get rid of that dependency.
|
||||||
|
*
|
||||||
|
* \warning Enabling this option makes some uses of ECP vulnerable to some
|
||||||
|
* side-channel attacks. Only enable it if you know that's not a problem for
|
||||||
|
* your use case.
|
||||||
|
*
|
||||||
|
* Uncomment this macro to disable some counter-measures in ECP.
|
||||||
|
*/
|
||||||
|
//#define MBEDTLS_ECP_NO_INTERNAL_RNG
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \def MBEDTLS_ECP_RESTARTABLE
|
* \def MBEDTLS_ECP_RESTARTABLE
|
||||||
*
|
*
|
||||||
|
@ -1663,6 +1746,23 @@
|
||||||
*/
|
*/
|
||||||
//#define MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT
|
//#define MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \def MBEDTLS_TEST_HOOKS
|
||||||
|
*
|
||||||
|
* Enable features for invasive testing such as introspection functions and
|
||||||
|
* hooks for fault injection. This enables additional unit tests.
|
||||||
|
*
|
||||||
|
* Merely enabling this feature should not change the behavior of the product.
|
||||||
|
* It only adds new code, and new branching points where the default behavior
|
||||||
|
* is the same as when this feature is disabled.
|
||||||
|
* However, this feature increases the attack surface: there is an added
|
||||||
|
* risk of vulnerabilities, and more gadgets that can make exploits easier.
|
||||||
|
* Therefore this feature must never be enabled in production.
|
||||||
|
*
|
||||||
|
* Uncomment to enable invasive tests.
|
||||||
|
*/
|
||||||
|
//#define MBEDTLS_TEST_HOOKS
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \def MBEDTLS_THREADING_ALT
|
* \def MBEDTLS_THREADING_ALT
|
||||||
*
|
*
|
||||||
|
@ -2149,7 +2249,7 @@
|
||||||
* Requires: MBEDTLS_AES_C or MBEDTLS_DES_C
|
* Requires: MBEDTLS_AES_C or MBEDTLS_DES_C
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
//#define MBEDTLS_CMAC_C
|
#define MBEDTLS_CMAC_C
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \def MBEDTLS_CTR_DRBG_C
|
* \def MBEDTLS_CTR_DRBG_C
|
||||||
|
@ -3043,7 +3143,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* MPI / BIGNUM options */
|
/* MPI / BIGNUM options */
|
||||||
//#define MBEDTLS_MPI_WINDOW_SIZE 6 /**< Maximum windows size used. */
|
//#define MBEDTLS_MPI_WINDOW_SIZE 6 /**< Maximum window size used. */
|
||||||
//#define MBEDTLS_MPI_MAX_SIZE 1024 /**< Maximum number of bytes for usable MPIs. */
|
//#define MBEDTLS_MPI_MAX_SIZE 1024 /**< Maximum number of bytes for usable MPIs. */
|
||||||
|
|
||||||
/* CTR_DRBG options */
|
/* CTR_DRBG options */
|
||||||
|
|
|
@ -38,8 +38,14 @@
|
||||||
* - \c 32 if \c MBEDTLS_ENTROPY_FORCE_SHA256 is enabled at compile time.
|
* - \c 32 if \c MBEDTLS_ENTROPY_FORCE_SHA256 is enabled at compile time.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2019, Arm Limited (or its affiliates), All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -53,7 +59,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_CTR_DRBG_H
|
#ifndef MBEDTLS_CTR_DRBG_H
|
||||||
|
@ -189,6 +214,13 @@ typedef struct mbedtls_ctr_drbg_context
|
||||||
void *p_entropy; /*!< The context for the entropy function. */
|
void *p_entropy; /*!< The context for the entropy function. */
|
||||||
|
|
||||||
#if defined(MBEDTLS_THREADING_C)
|
#if defined(MBEDTLS_THREADING_C)
|
||||||
|
/* Invariant: the mutex is initialized if and only if f_entropy != NULL.
|
||||||
|
* This means that the mutex is initialized during the initial seeding
|
||||||
|
* in mbedtls_ctr_drbg_seed() and freed in mbedtls_ctr_drbg_free().
|
||||||
|
*
|
||||||
|
* Note that this invariant may change without notice. Do not rely on it
|
||||||
|
* and do not access the mutex directly in application code.
|
||||||
|
*/
|
||||||
mbedtls_threading_mutex_t mutex;
|
mbedtls_threading_mutex_t mutex;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -199,6 +231,11 @@ mbedtls_ctr_drbg_context;
|
||||||
* and prepares it for mbedtls_ctr_drbg_seed()
|
* and prepares it for mbedtls_ctr_drbg_seed()
|
||||||
* or mbedtls_ctr_drbg_free().
|
* or mbedtls_ctr_drbg_free().
|
||||||
*
|
*
|
||||||
|
* \note The reseed interval is
|
||||||
|
* #MBEDTLS_CTR_DRBG_RESEED_INTERVAL by default.
|
||||||
|
* You can override it by calling
|
||||||
|
* mbedtls_ctr_drbg_set_reseed_interval().
|
||||||
|
*
|
||||||
* \param ctx The CTR_DRBG context to initialize.
|
* \param ctx The CTR_DRBG context to initialize.
|
||||||
*/
|
*/
|
||||||
void mbedtls_ctr_drbg_init( mbedtls_ctr_drbg_context *ctx );
|
void mbedtls_ctr_drbg_init( mbedtls_ctr_drbg_context *ctx );
|
||||||
|
@ -247,6 +284,15 @@ void mbedtls_ctr_drbg_init( mbedtls_ctr_drbg_context *ctx );
|
||||||
* device.
|
* device.
|
||||||
*/
|
*/
|
||||||
#endif
|
#endif
|
||||||
|
#if defined(MBEDTLS_THREADING_C)
|
||||||
|
/**
|
||||||
|
* \note When Mbed TLS is built with threading support,
|
||||||
|
* after this function returns successfully,
|
||||||
|
* it is safe to call mbedtls_ctr_drbg_random()
|
||||||
|
* from multiple threads. Other operations, including
|
||||||
|
* reseeding, are not thread-safe.
|
||||||
|
*/
|
||||||
|
#endif /* MBEDTLS_THREADING_C */
|
||||||
/**
|
/**
|
||||||
* \param ctx The CTR_DRBG context to seed.
|
* \param ctx The CTR_DRBG context to seed.
|
||||||
* It must have been initialized with
|
* It must have been initialized with
|
||||||
|
@ -256,6 +302,8 @@ void mbedtls_ctr_drbg_init( mbedtls_ctr_drbg_context *ctx );
|
||||||
* the same context unless you call
|
* the same context unless you call
|
||||||
* mbedtls_ctr_drbg_free() and mbedtls_ctr_drbg_init()
|
* mbedtls_ctr_drbg_free() and mbedtls_ctr_drbg_init()
|
||||||
* again first.
|
* again first.
|
||||||
|
* After a failed call to mbedtls_ctr_drbg_seed(),
|
||||||
|
* you must call mbedtls_ctr_drbg_free().
|
||||||
* \param f_entropy The entropy callback, taking as arguments the
|
* \param f_entropy The entropy callback, taking as arguments the
|
||||||
* \p p_entropy context, the buffer to fill, and the
|
* \p p_entropy context, the buffer to fill, and the
|
||||||
* length of the buffer.
|
* length of the buffer.
|
||||||
|
@ -280,7 +328,8 @@ int mbedtls_ctr_drbg_seed( mbedtls_ctr_drbg_context *ctx,
|
||||||
size_t len );
|
size_t len );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief This function clears CTR_CRBG context data.
|
* \brief This function resets CTR_DRBG context to the state immediately
|
||||||
|
* after initial call of mbedtls_ctr_drbg_init().
|
||||||
*
|
*
|
||||||
* \param ctx The CTR_DRBG context to clear.
|
* \param ctx The CTR_DRBG context to clear.
|
||||||
*/
|
*/
|
||||||
|
@ -346,6 +395,11 @@ void mbedtls_ctr_drbg_set_reseed_interval( mbedtls_ctr_drbg_context *ctx,
|
||||||
* \brief This function reseeds the CTR_DRBG context, that is
|
* \brief This function reseeds the CTR_DRBG context, that is
|
||||||
* extracts data from the entropy source.
|
* extracts data from the entropy source.
|
||||||
*
|
*
|
||||||
|
* \note This function is not thread-safe. It is not safe
|
||||||
|
* to call this function if another thread might be
|
||||||
|
* concurrently obtaining random numbers from the same
|
||||||
|
* context or updating or reseeding the same context.
|
||||||
|
*
|
||||||
* \param ctx The CTR_DRBG context.
|
* \param ctx The CTR_DRBG context.
|
||||||
* \param additional Additional data to add to the state. Can be \c NULL.
|
* \param additional Additional data to add to the state. Can be \c NULL.
|
||||||
* \param len The length of the additional data.
|
* \param len The length of the additional data.
|
||||||
|
@ -363,6 +417,11 @@ int mbedtls_ctr_drbg_reseed( mbedtls_ctr_drbg_context *ctx,
|
||||||
/**
|
/**
|
||||||
* \brief This function updates the state of the CTR_DRBG context.
|
* \brief This function updates the state of the CTR_DRBG context.
|
||||||
*
|
*
|
||||||
|
* \note This function is not thread-safe. It is not safe
|
||||||
|
* to call this function if another thread might be
|
||||||
|
* concurrently obtaining random numbers from the same
|
||||||
|
* context or updating or reseeding the same context.
|
||||||
|
*
|
||||||
* \param ctx The CTR_DRBG context.
|
* \param ctx The CTR_DRBG context.
|
||||||
* \param additional The data to update the state with. This must not be
|
* \param additional The data to update the state with. This must not be
|
||||||
* \c NULL unless \p add_len is \c 0.
|
* \c NULL unless \p add_len is \c 0.
|
||||||
|
@ -386,6 +445,11 @@ int mbedtls_ctr_drbg_update_ret( mbedtls_ctr_drbg_context *ctx,
|
||||||
* This function automatically reseeds if the reseed counter is exceeded
|
* This function automatically reseeds if the reseed counter is exceeded
|
||||||
* or prediction resistance is enabled.
|
* or prediction resistance is enabled.
|
||||||
*
|
*
|
||||||
|
* \note This function is not thread-safe. It is not safe
|
||||||
|
* to call this function if another thread might be
|
||||||
|
* concurrently obtaining random numbers from the same
|
||||||
|
* context or updating or reseeding the same context.
|
||||||
|
*
|
||||||
* \param p_rng The CTR_DRBG context. This must be a pointer to a
|
* \param p_rng The CTR_DRBG context. This must be a pointer to a
|
||||||
* #mbedtls_ctr_drbg_context structure.
|
* #mbedtls_ctr_drbg_context structure.
|
||||||
* \param output The buffer to fill.
|
* \param output The buffer to fill.
|
||||||
|
@ -414,8 +478,16 @@ int mbedtls_ctr_drbg_random_with_add( void *p_rng,
|
||||||
*
|
*
|
||||||
* This function automatically reseeds if the reseed counter is exceeded
|
* This function automatically reseeds if the reseed counter is exceeded
|
||||||
* or prediction resistance is enabled.
|
* or prediction resistance is enabled.
|
||||||
*
|
*/
|
||||||
*
|
#if defined(MBEDTLS_THREADING_C)
|
||||||
|
/**
|
||||||
|
* \note When Mbed TLS is built with threading support,
|
||||||
|
* it is safe to call mbedtls_ctr_drbg_random()
|
||||||
|
* from multiple threads. Other operations, including
|
||||||
|
* reseeding, are not thread-safe.
|
||||||
|
*/
|
||||||
|
#endif /* MBEDTLS_THREADING_C */
|
||||||
|
/**
|
||||||
* \param p_rng The CTR_DRBG context. This must be a pointer to a
|
* \param p_rng The CTR_DRBG context. This must be a pointer to a
|
||||||
* #mbedtls_ctr_drbg_context structure.
|
* #mbedtls_ctr_drbg_context structure.
|
||||||
* \param output The buffer to fill.
|
* \param output The buffer to fill.
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief Functions for controlling and providing debug output from the library.
|
* \brief Functions for controlling and providing debug output from the library.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_DEBUG_H
|
#ifndef MBEDTLS_DEBUG_H
|
||||||
#define MBEDTLS_DEBUG_H
|
#define MBEDTLS_DEBUG_H
|
||||||
|
|
|
@ -8,8 +8,14 @@
|
||||||
* instead.
|
* instead.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -23,7 +29,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_DES_H
|
#ifndef MBEDTLS_DES_H
|
||||||
|
|
|
@ -44,8 +44,14 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -59,7 +65,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_DHM_H
|
#ifndef MBEDTLS_DHM_H
|
||||||
|
|
|
@ -13,8 +13,14 @@
|
||||||
* Cryptography</em>.
|
* Cryptography</em>.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -28,7 +34,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_ECDH_H
|
#ifndef MBEDTLS_ECDH_H
|
||||||
|
|
|
@ -11,8 +11,14 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -26,7 +32,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_ECDSA_H
|
#ifndef MBEDTLS_ECDSA_H
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief Elliptic curve J-PAKE
|
* \brief Elliptic curve J-PAKE
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_ECJPAKE_H
|
#ifndef MBEDTLS_ECJPAKE_H
|
||||||
#define MBEDTLS_ECJPAKE_H
|
#define MBEDTLS_ECJPAKE_H
|
||||||
|
|
|
@ -15,8 +15,14 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -30,7 +36,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_ECP_H
|
#ifndef MBEDTLS_ECP_H
|
||||||
|
@ -813,6 +838,9 @@ int mbedtls_ecp_tls_write_group( const mbedtls_ecp_group *grp,
|
||||||
* intermediate results to prevent potential timing attacks
|
* intermediate results to prevent potential timing attacks
|
||||||
* targeting these results. We recommend always providing
|
* targeting these results. We recommend always providing
|
||||||
* a non-NULL \p f_rng. The overhead is negligible.
|
* a non-NULL \p f_rng. The overhead is negligible.
|
||||||
|
* Note: unless #MBEDTLS_ECP_NO_INTERNAL_RNG is defined, when
|
||||||
|
* \p f_rng is NULL, an internal RNG (seeded from the value
|
||||||
|
* of \p m) will be used instead.
|
||||||
*
|
*
|
||||||
* \param grp The ECP group to use.
|
* \param grp The ECP group to use.
|
||||||
* This must be initialized and have group parameters
|
* This must be initialized and have group parameters
|
||||||
|
|
|
@ -5,8 +5,14 @@
|
||||||
* point arithmetic.
|
* point arithmetic.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2016, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -20,7 +26,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief Entropy accumulator implementation
|
* \brief Entropy accumulator implementation
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2016, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_ENTROPY_H
|
#ifndef MBEDTLS_ENTROPY_H
|
||||||
#define MBEDTLS_ENTROPY_H
|
#define MBEDTLS_ENTROPY_H
|
||||||
|
@ -122,13 +147,15 @@ mbedtls_entropy_source_state;
|
||||||
*/
|
*/
|
||||||
typedef struct mbedtls_entropy_context
|
typedef struct mbedtls_entropy_context
|
||||||
{
|
{
|
||||||
int accumulator_started;
|
int accumulator_started; /* 0 after init.
|
||||||
|
* 1 after the first update.
|
||||||
|
* -1 after free. */
|
||||||
#if defined(MBEDTLS_ENTROPY_SHA512_ACCUMULATOR)
|
#if defined(MBEDTLS_ENTROPY_SHA512_ACCUMULATOR)
|
||||||
mbedtls_sha512_context accumulator;
|
mbedtls_sha512_context accumulator;
|
||||||
#else
|
#else
|
||||||
mbedtls_sha256_context accumulator;
|
mbedtls_sha256_context accumulator;
|
||||||
#endif
|
#endif
|
||||||
int source_count;
|
int source_count; /* Number of entries used in source. */
|
||||||
mbedtls_entropy_source_state source[MBEDTLS_ENTROPY_MAX_SOURCES];
|
mbedtls_entropy_source_state source[MBEDTLS_ENTROPY_MAX_SOURCES];
|
||||||
#if defined(MBEDTLS_HAVEGE_C)
|
#if defined(MBEDTLS_HAVEGE_C)
|
||||||
mbedtls_havege_state havege_data;
|
mbedtls_havege_state havege_data;
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief Platform-specific and custom entropy polling functions
|
* \brief Platform-specific and custom entropy polling functions
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2016, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_ENTROPY_POLL_H
|
#ifndef MBEDTLS_ENTROPY_POLL_H
|
||||||
#define MBEDTLS_ENTROPY_POLL_H
|
#define MBEDTLS_ENTROPY_POLL_H
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief Error to string translation
|
* \brief Error to string translation
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2018, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_ERROR_H
|
#ifndef MBEDTLS_ERROR_H
|
||||||
#define MBEDTLS_ERROR_H
|
#define MBEDTLS_ERROR_H
|
||||||
|
@ -100,6 +125,7 @@
|
||||||
* ECP 4 10 (Started from top)
|
* ECP 4 10 (Started from top)
|
||||||
* MD 5 5
|
* MD 5 5
|
||||||
* HKDF 5 1 (Started from top)
|
* HKDF 5 1 (Started from top)
|
||||||
|
* SSL 5 1 (Started from 0x5E80)
|
||||||
* CIPHER 6 8
|
* CIPHER 6 8
|
||||||
* SSL 6 23 (Started from top)
|
* SSL 6 23 (Started from top)
|
||||||
* SSL 7 32
|
* SSL 7 32
|
||||||
|
|
|
@ -12,8 +12,14 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -27,7 +33,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_GCM_H
|
#ifndef MBEDTLS_GCM_H
|
||||||
|
@ -157,7 +182,7 @@ int mbedtls_gcm_setkey( mbedtls_gcm_context *ctx,
|
||||||
* than zero, this must be a writable buffer of at least that
|
* than zero, this must be a writable buffer of at least that
|
||||||
* size in Bytes.
|
* size in Bytes.
|
||||||
* \param tag_len The length of the tag to generate.
|
* \param tag_len The length of the tag to generate.
|
||||||
* \param tag The buffer for holding the tag. This must be a readable
|
* \param tag The buffer for holding the tag. This must be a writable
|
||||||
* buffer of at least \p tag_len Bytes.
|
* buffer of at least \p tag_len Bytes.
|
||||||
*
|
*
|
||||||
* \return \c 0 if the encryption or decryption was performed
|
* \return \c 0 if the encryption or decryption was performed
|
||||||
|
@ -285,7 +310,7 @@ int mbedtls_gcm_update( mbedtls_gcm_context *ctx,
|
||||||
* tag. The tag can have a maximum length of 16 Bytes.
|
* tag. The tag can have a maximum length of 16 Bytes.
|
||||||
*
|
*
|
||||||
* \param ctx The GCM context. This must be initialized.
|
* \param ctx The GCM context. This must be initialized.
|
||||||
* \param tag The buffer for holding the tag. This must be a readable
|
* \param tag The buffer for holding the tag. This must be a writable
|
||||||
* buffer of at least \p tag_len Bytes.
|
* buffer of at least \p tag_len Bytes.
|
||||||
* \param tag_len The length of the tag to generate. This must be at least
|
* \param tag_len The length of the tag to generate. This must be at least
|
||||||
* four.
|
* four.
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief HAVEGE: HArdware Volatile Entropy Gathering and Expansion
|
* \brief HAVEGE: HArdware Volatile Entropy Gathering and Expansion
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_HAVEGE_H
|
#ifndef MBEDTLS_HAVEGE_H
|
||||||
#define MBEDTLS_HAVEGE_H
|
#define MBEDTLS_HAVEGE_H
|
||||||
|
|
|
@ -7,8 +7,14 @@
|
||||||
* specified by RFC 5869.
|
* specified by RFC 5869.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2016-2019, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -22,7 +28,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_HKDF_H
|
#ifndef MBEDTLS_HKDF_H
|
||||||
#define MBEDTLS_HKDF_H
|
#define MBEDTLS_HKDF_H
|
||||||
|
|
|
@ -8,8 +8,14 @@
|
||||||
* Deterministic Random Bit Generators</em>.
|
* Deterministic Random Bit Generators</em>.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2019, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -23,7 +29,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_HMAC_DRBG_H
|
#ifndef MBEDTLS_HMAC_DRBG_H
|
||||||
#define MBEDTLS_HMAC_DRBG_H
|
#define MBEDTLS_HMAC_DRBG_H
|
||||||
|
@ -103,6 +128,14 @@ typedef struct mbedtls_hmac_drbg_context
|
||||||
void *p_entropy; /*!< context for the entropy function */
|
void *p_entropy; /*!< context for the entropy function */
|
||||||
|
|
||||||
#if defined(MBEDTLS_THREADING_C)
|
#if defined(MBEDTLS_THREADING_C)
|
||||||
|
/* Invariant: the mutex is initialized if and only if
|
||||||
|
* md_ctx->md_info != NULL. This means that the mutex is initialized
|
||||||
|
* during the initial seeding in mbedtls_hmac_drbg_seed() or
|
||||||
|
* mbedtls_hmac_drbg_seed_buf() and freed in mbedtls_ctr_drbg_free().
|
||||||
|
*
|
||||||
|
* Note that this invariant may change without notice. Do not rely on it
|
||||||
|
* and do not access the mutex directly in application code.
|
||||||
|
*/
|
||||||
mbedtls_threading_mutex_t mutex;
|
mbedtls_threading_mutex_t mutex;
|
||||||
#endif
|
#endif
|
||||||
} mbedtls_hmac_drbg_context;
|
} mbedtls_hmac_drbg_context;
|
||||||
|
@ -113,6 +146,10 @@ typedef struct mbedtls_hmac_drbg_context
|
||||||
* This function makes the context ready for mbedtls_hmac_drbg_seed(),
|
* This function makes the context ready for mbedtls_hmac_drbg_seed(),
|
||||||
* mbedtls_hmac_drbg_seed_buf() or mbedtls_hmac_drbg_free().
|
* mbedtls_hmac_drbg_seed_buf() or mbedtls_hmac_drbg_free().
|
||||||
*
|
*
|
||||||
|
* \note The reseed interval is #MBEDTLS_HMAC_DRBG_RESEED_INTERVAL
|
||||||
|
* by default. Override this value by calling
|
||||||
|
* mbedtls_hmac_drbg_set_reseed_interval().
|
||||||
|
*
|
||||||
* \param ctx HMAC_DRBG context to be initialized.
|
* \param ctx HMAC_DRBG context to be initialized.
|
||||||
*/
|
*/
|
||||||
void mbedtls_hmac_drbg_init( mbedtls_hmac_drbg_context *ctx );
|
void mbedtls_hmac_drbg_init( mbedtls_hmac_drbg_context *ctx );
|
||||||
|
@ -148,7 +185,17 @@ void mbedtls_hmac_drbg_init( mbedtls_hmac_drbg_context *ctx );
|
||||||
* \note During the initial seeding, this function calls
|
* \note During the initial seeding, this function calls
|
||||||
* the entropy source to obtain a nonce
|
* the entropy source to obtain a nonce
|
||||||
* whose length is half the entropy length.
|
* whose length is half the entropy length.
|
||||||
*
|
*/
|
||||||
|
#if defined(MBEDTLS_THREADING_C)
|
||||||
|
/**
|
||||||
|
* \note When Mbed TLS is built with threading support,
|
||||||
|
* after this function returns successfully,
|
||||||
|
* it is safe to call mbedtls_hmac_drbg_random()
|
||||||
|
* from multiple threads. Other operations, including
|
||||||
|
* reseeding, are not thread-safe.
|
||||||
|
*/
|
||||||
|
#endif /* MBEDTLS_THREADING_C */
|
||||||
|
/**
|
||||||
* \param ctx HMAC_DRBG context to be seeded.
|
* \param ctx HMAC_DRBG context to be seeded.
|
||||||
* \param md_info MD algorithm to use for HMAC_DRBG.
|
* \param md_info MD algorithm to use for HMAC_DRBG.
|
||||||
* \param f_entropy The entropy callback, taking as arguments the
|
* \param f_entropy The entropy callback, taking as arguments the
|
||||||
|
@ -187,7 +234,17 @@ int mbedtls_hmac_drbg_seed( mbedtls_hmac_drbg_context *ctx,
|
||||||
*
|
*
|
||||||
* This function is meant for use in algorithms that need a pseudorandom
|
* This function is meant for use in algorithms that need a pseudorandom
|
||||||
* input such as deterministic ECDSA.
|
* input such as deterministic ECDSA.
|
||||||
*
|
*/
|
||||||
|
#if defined(MBEDTLS_THREADING_C)
|
||||||
|
/**
|
||||||
|
* \note When Mbed TLS is built with threading support,
|
||||||
|
* after this function returns successfully,
|
||||||
|
* it is safe to call mbedtls_hmac_drbg_random()
|
||||||
|
* from multiple threads. Other operations, including
|
||||||
|
* reseeding, are not thread-safe.
|
||||||
|
*/
|
||||||
|
#endif /* MBEDTLS_THREADING_C */
|
||||||
|
/**
|
||||||
* \param ctx HMAC_DRBG context to be initialised.
|
* \param ctx HMAC_DRBG context to be initialised.
|
||||||
* \param md_info MD algorithm to use for HMAC_DRBG.
|
* \param md_info MD algorithm to use for HMAC_DRBG.
|
||||||
* \param data Concatenation of the initial entropy string and
|
* \param data Concatenation of the initial entropy string and
|
||||||
|
@ -250,6 +307,11 @@ void mbedtls_hmac_drbg_set_reseed_interval( mbedtls_hmac_drbg_context *ctx,
|
||||||
/**
|
/**
|
||||||
* \brief This function updates the state of the HMAC_DRBG context.
|
* \brief This function updates the state of the HMAC_DRBG context.
|
||||||
*
|
*
|
||||||
|
* \note This function is not thread-safe. It is not safe
|
||||||
|
* to call this function if another thread might be
|
||||||
|
* concurrently obtaining random numbers from the same
|
||||||
|
* context or updating or reseeding the same context.
|
||||||
|
*
|
||||||
* \param ctx The HMAC_DRBG context.
|
* \param ctx The HMAC_DRBG context.
|
||||||
* \param additional The data to update the state with.
|
* \param additional The data to update the state with.
|
||||||
* If this is \c NULL, there is no additional data.
|
* If this is \c NULL, there is no additional data.
|
||||||
|
@ -266,6 +328,11 @@ int mbedtls_hmac_drbg_update_ret( mbedtls_hmac_drbg_context *ctx,
|
||||||
* \brief This function reseeds the HMAC_DRBG context, that is
|
* \brief This function reseeds the HMAC_DRBG context, that is
|
||||||
* extracts data from the entropy source.
|
* extracts data from the entropy source.
|
||||||
*
|
*
|
||||||
|
* \note This function is not thread-safe. It is not safe
|
||||||
|
* to call this function if another thread might be
|
||||||
|
* concurrently obtaining random numbers from the same
|
||||||
|
* context or updating or reseeding the same context.
|
||||||
|
*
|
||||||
* \param ctx The HMAC_DRBG context.
|
* \param ctx The HMAC_DRBG context.
|
||||||
* \param additional Additional data to add to the state.
|
* \param additional Additional data to add to the state.
|
||||||
* If this is \c NULL, there is no additional data
|
* If this is \c NULL, there is no additional data
|
||||||
|
@ -291,6 +358,11 @@ int mbedtls_hmac_drbg_reseed( mbedtls_hmac_drbg_context *ctx,
|
||||||
* This function automatically reseeds if the reseed counter is exceeded
|
* This function automatically reseeds if the reseed counter is exceeded
|
||||||
* or prediction resistance is enabled.
|
* or prediction resistance is enabled.
|
||||||
*
|
*
|
||||||
|
* \note This function is not thread-safe. It is not safe
|
||||||
|
* to call this function if another thread might be
|
||||||
|
* concurrently obtaining random numbers from the same
|
||||||
|
* context or updating or reseeding the same context.
|
||||||
|
*
|
||||||
* \param p_rng The HMAC_DRBG context. This must be a pointer to a
|
* \param p_rng The HMAC_DRBG context. This must be a pointer to a
|
||||||
* #mbedtls_hmac_drbg_context structure.
|
* #mbedtls_hmac_drbg_context structure.
|
||||||
* \param output The buffer to fill.
|
* \param output The buffer to fill.
|
||||||
|
@ -320,7 +392,16 @@ int mbedtls_hmac_drbg_random_with_add( void *p_rng,
|
||||||
*
|
*
|
||||||
* This function automatically reseeds if the reseed counter is exceeded
|
* This function automatically reseeds if the reseed counter is exceeded
|
||||||
* or prediction resistance is enabled.
|
* or prediction resistance is enabled.
|
||||||
*
|
*/
|
||||||
|
#if defined(MBEDTLS_THREADING_C)
|
||||||
|
/**
|
||||||
|
* \note When Mbed TLS is built with threading support,
|
||||||
|
* it is safe to call mbedtls_ctr_drbg_random()
|
||||||
|
* from multiple threads. Other operations, including
|
||||||
|
* reseeding, are not thread-safe.
|
||||||
|
*/
|
||||||
|
#endif /* MBEDTLS_THREADING_C */
|
||||||
|
/**
|
||||||
* \param p_rng The HMAC_DRBG context. This must be a pointer to a
|
* \param p_rng The HMAC_DRBG context. This must be a pointer to a
|
||||||
* #mbedtls_hmac_drbg_context structure.
|
* #mbedtls_hmac_drbg_context structure.
|
||||||
* \param output The buffer to fill.
|
* \param output The buffer to fill.
|
||||||
|
@ -336,7 +417,8 @@ int mbedtls_hmac_drbg_random_with_add( void *p_rng,
|
||||||
int mbedtls_hmac_drbg_random( void *p_rng, unsigned char *output, size_t out_len );
|
int mbedtls_hmac_drbg_random( void *p_rng, unsigned char *output, size_t out_len );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Free an HMAC_DRBG context
|
* \brief This function resets HMAC_DRBG context to the state immediately
|
||||||
|
* after initial call of mbedtls_hmac_drbg_init().
|
||||||
*
|
*
|
||||||
* \param ctx The HMAC_DRBG context to free.
|
* \param ctx The HMAC_DRBG context to free.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -6,8 +6,14 @@
|
||||||
* \author Adriaan de Jong <dejong@fox-it.com>
|
* \author Adriaan de Jong <dejong@fox-it.com>
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -21,7 +27,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_MD_H
|
#ifndef MBEDTLS_MD_H
|
||||||
|
@ -98,6 +123,8 @@ typedef struct mbedtls_md_context_t
|
||||||
* \brief This function returns the list of digests supported by the
|
* \brief This function returns the list of digests supported by the
|
||||||
* generic digest module.
|
* generic digest module.
|
||||||
*
|
*
|
||||||
|
* \note The list starts with the strongest available hashes.
|
||||||
|
*
|
||||||
* \return A statically allocated array of digests. Each element
|
* \return A statically allocated array of digests. Each element
|
||||||
* in the returned list is an integer belonging to the
|
* in the returned list is an integer belonging to the
|
||||||
* message-digest enumeration #mbedtls_md_type_t.
|
* message-digest enumeration #mbedtls_md_type_t.
|
||||||
|
|
|
@ -8,8 +8,14 @@
|
||||||
* instead.
|
* instead.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -23,7 +29,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_MD2_H
|
#ifndef MBEDTLS_MD2_H
|
||||||
|
|
|
@ -8,8 +8,14 @@
|
||||||
* instead.
|
* instead.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -23,7 +29,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_MD4_H
|
#ifndef MBEDTLS_MD4_H
|
||||||
|
|
|
@ -8,8 +8,14 @@
|
||||||
* digests instead.
|
* digests instead.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -23,7 +29,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_MD5_H
|
#ifndef MBEDTLS_MD5_H
|
||||||
#define MBEDTLS_MD5_H
|
#define MBEDTLS_MD5_H
|
||||||
|
|
|
@ -8,8 +8,14 @@
|
||||||
* \author Adriaan de Jong <dejong@fox-it.com>
|
* \author Adriaan de Jong <dejong@fox-it.com>
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -23,7 +29,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_MD_WRAP_H
|
#ifndef MBEDTLS_MD_WRAP_H
|
||||||
#define MBEDTLS_MD_WRAP_H
|
#define MBEDTLS_MD_WRAP_H
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief Buffer-based memory allocator
|
* \brief Buffer-based memory allocator
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_MEMORY_BUFFER_ALLOC_H
|
#ifndef MBEDTLS_MEMORY_BUFFER_ALLOC_H
|
||||||
#define MBEDTLS_MEMORY_BUFFER_ALLOC_H
|
#define MBEDTLS_MEMORY_BUFFER_ALLOC_H
|
||||||
|
|
|
@ -6,8 +6,14 @@
|
||||||
* \deprecated Superseded by mbedtls/net_sockets.h
|
* \deprecated Superseded by mbedtls/net_sockets.h
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2016, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -21,7 +27,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
|
@ -20,8 +20,14 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -35,7 +41,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_NET_SOCKETS_H
|
#ifndef MBEDTLS_NET_SOCKETS_H
|
||||||
#define MBEDTLS_NET_SOCKETS_H
|
#define MBEDTLS_NET_SOCKETS_H
|
||||||
|
@ -126,6 +151,7 @@ int mbedtls_net_connect( mbedtls_net_context *ctx, const char *host, const char
|
||||||
*
|
*
|
||||||
* \return 0 if successful, or one of:
|
* \return 0 if successful, or one of:
|
||||||
* MBEDTLS_ERR_NET_SOCKET_FAILED,
|
* MBEDTLS_ERR_NET_SOCKET_FAILED,
|
||||||
|
* MBEDTLS_ERR_NET_UNKNOWN_HOST,
|
||||||
* MBEDTLS_ERR_NET_BIND_FAILED,
|
* MBEDTLS_ERR_NET_BIND_FAILED,
|
||||||
* MBEDTLS_ERR_NET_LISTEN_FAILED
|
* MBEDTLS_ERR_NET_LISTEN_FAILED
|
||||||
*
|
*
|
||||||
|
@ -145,6 +171,8 @@ int mbedtls_net_bind( mbedtls_net_context *ctx, const char *bind_ip, const char
|
||||||
* can be NULL if client_ip is null
|
* can be NULL if client_ip is null
|
||||||
*
|
*
|
||||||
* \return 0 if successful, or
|
* \return 0 if successful, or
|
||||||
|
* MBEDTLS_ERR_NET_SOCKET_FAILED,
|
||||||
|
* MBEDTLS_ERR_NET_BIND_FAILED,
|
||||||
* MBEDTLS_ERR_NET_ACCEPT_FAILED, or
|
* MBEDTLS_ERR_NET_ACCEPT_FAILED, or
|
||||||
* MBEDTLS_ERR_NET_BUFFER_TOO_SMALL if buf_size is too small,
|
* MBEDTLS_ERR_NET_BUFFER_TOO_SMALL if buf_size is too small,
|
||||||
* MBEDTLS_ERR_SSL_WANT_READ if bind_fd was set to
|
* MBEDTLS_ERR_SSL_WANT_READ if bind_fd was set to
|
||||||
|
@ -157,6 +185,10 @@ int mbedtls_net_accept( mbedtls_net_context *bind_ctx,
|
||||||
/**
|
/**
|
||||||
* \brief Check and wait for the context to be ready for read/write
|
* \brief Check and wait for the context to be ready for read/write
|
||||||
*
|
*
|
||||||
|
* \note The current implementation of this function uses
|
||||||
|
* select() and returns an error if the file descriptor
|
||||||
|
* is \c FD_SETSIZE or greater.
|
||||||
|
*
|
||||||
* \param ctx Socket to check
|
* \param ctx Socket to check
|
||||||
* \param rw Bitflag composed of MBEDTLS_NET_POLL_READ and
|
* \param rw Bitflag composed of MBEDTLS_NET_POLL_READ and
|
||||||
* MBEDTLS_NET_POLL_WRITE specifying the events
|
* MBEDTLS_NET_POLL_WRITE specifying the events
|
||||||
|
@ -238,16 +270,21 @@ int mbedtls_net_send( void *ctx, const unsigned char *buf, size_t len );
|
||||||
* 'timeout' seconds. If no error occurs, the actual amount
|
* 'timeout' seconds. If no error occurs, the actual amount
|
||||||
* read is returned.
|
* read is returned.
|
||||||
*
|
*
|
||||||
|
* \note The current implementation of this function uses
|
||||||
|
* select() and returns an error if the file descriptor
|
||||||
|
* is \c FD_SETSIZE or greater.
|
||||||
|
*
|
||||||
* \param ctx Socket
|
* \param ctx Socket
|
||||||
* \param buf The buffer to write to
|
* \param buf The buffer to write to
|
||||||
* \param len Maximum length of the buffer
|
* \param len Maximum length of the buffer
|
||||||
* \param timeout Maximum number of milliseconds to wait for data
|
* \param timeout Maximum number of milliseconds to wait for data
|
||||||
* 0 means no timeout (wait forever)
|
* 0 means no timeout (wait forever)
|
||||||
*
|
*
|
||||||
* \return the number of bytes received,
|
* \return The number of bytes received if successful.
|
||||||
* or a non-zero error code:
|
* MBEDTLS_ERR_SSL_TIMEOUT if the operation timed out.
|
||||||
* MBEDTLS_ERR_SSL_TIMEOUT if the operation timed out,
|
|
||||||
* MBEDTLS_ERR_SSL_WANT_READ if interrupted by a signal.
|
* MBEDTLS_ERR_SSL_WANT_READ if interrupted by a signal.
|
||||||
|
* Another negative error code (MBEDTLS_ERR_NET_xxx)
|
||||||
|
* for other failures.
|
||||||
*
|
*
|
||||||
* \note This function will block (until data becomes available or
|
* \note This function will block (until data becomes available or
|
||||||
* timeout is reached) even if the socket is set to
|
* timeout is reached) even if the socket is set to
|
||||||
|
|
|
@ -16,8 +16,14 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2018, Arm Limited (or its affiliates), All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -31,7 +37,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_NIST_KW_H
|
#ifndef MBEDTLS_NIST_KW_H
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief Object Identifier (OID) database
|
* \brief Object Identifier (OID) database
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_OID_H
|
#ifndef MBEDTLS_OID_H
|
||||||
#define MBEDTLS_OID_H
|
#define MBEDTLS_OID_H
|
||||||
|
|
|
@ -8,8 +8,14 @@
|
||||||
* functions; you must not call them directly.
|
* functions; you must not call them directly.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -23,7 +29,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_PADLOCK_H
|
#ifndef MBEDTLS_PADLOCK_H
|
||||||
#define MBEDTLS_PADLOCK_H
|
#define MBEDTLS_PADLOCK_H
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief Privacy Enhanced Mail (PEM) decoding
|
* \brief Privacy Enhanced Mail (PEM) decoding
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_PEM_H
|
#ifndef MBEDTLS_PEM_H
|
||||||
#define MBEDTLS_PEM_H
|
#define MBEDTLS_PEM_H
|
||||||
|
@ -112,17 +137,27 @@ void mbedtls_pem_free( mbedtls_pem_context *ctx );
|
||||||
* \brief Write a buffer of PEM information from a DER encoded
|
* \brief Write a buffer of PEM information from a DER encoded
|
||||||
* buffer.
|
* buffer.
|
||||||
*
|
*
|
||||||
* \param header header string to write
|
* \param header The header string to write.
|
||||||
* \param footer footer string to write
|
* \param footer The footer string to write.
|
||||||
* \param der_data DER data to write
|
* \param der_data The DER data to encode.
|
||||||
* \param der_len length of the DER data
|
* \param der_len The length of the DER data \p der_data in Bytes.
|
||||||
* \param buf buffer to write to
|
* \param buf The buffer to write to.
|
||||||
* \param buf_len length of output buffer
|
* \param buf_len The length of the output buffer \p buf in Bytes.
|
||||||
* \param olen total length written / required (if buf_len is not enough)
|
* \param olen The address at which to store the total length written
|
||||||
|
* or required (if \p buf_len is not enough).
|
||||||
*
|
*
|
||||||
* \return 0 on success, or a specific PEM or BASE64 error code. On
|
* \note You may pass \c NULL for \p buf and \c 0 for \p buf_len
|
||||||
* MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL olen is the required
|
* to request the length of the resulting PEM buffer in
|
||||||
* size.
|
* `*olen`.
|
||||||
|
*
|
||||||
|
* \note This function may be called with overlapping \p der_data
|
||||||
|
* and \p buf buffers.
|
||||||
|
*
|
||||||
|
* \return \c 0 on success.
|
||||||
|
* \return #MBEDTLS_ERR_BASE64_BUFFER_TOO_SMALL if \p buf isn't large
|
||||||
|
* enough to hold the PEM buffer. In this case, `*olen` holds
|
||||||
|
* the required minimum size of \p buf.
|
||||||
|
* \return Another PEM or BASE64 error code on other kinds of failure.
|
||||||
*/
|
*/
|
||||||
int mbedtls_pem_write_buffer( const char *header, const char *footer,
|
int mbedtls_pem_write_buffer( const char *header, const char *footer,
|
||||||
const unsigned char *der_data, size_t der_len,
|
const unsigned char *der_data, size_t der_len,
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief Public Key abstraction layer
|
* \brief Public Key abstraction layer
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_PK_H
|
#ifndef MBEDTLS_PK_H
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief Public Key abstraction layer: wrapper functions
|
* \brief Public Key abstraction layer: wrapper functions
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_PK_WRAP_H
|
#ifndef MBEDTLS_PK_WRAP_H
|
||||||
|
|
|
@ -6,8 +6,14 @@
|
||||||
* \author Adriaan de Jong <dejong@fox-it.com>
|
* \author Adriaan de Jong <dejong@fox-it.com>
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -21,7 +27,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_PKCS11_H
|
#ifndef MBEDTLS_PKCS11_H
|
||||||
#define MBEDTLS_PKCS11_H
|
#define MBEDTLS_PKCS11_H
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief PKCS#12 Personal Information Exchange Syntax
|
* \brief PKCS#12 Personal Information Exchange Syntax
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_PKCS12_H
|
#ifndef MBEDTLS_PKCS12_H
|
||||||
#define MBEDTLS_PKCS12_H
|
#define MBEDTLS_PKCS12_H
|
||||||
|
|
|
@ -6,8 +6,14 @@
|
||||||
* \author Mathias Olsson <mathias@kompetensum.com>
|
* \author Mathias Olsson <mathias@kompetensum.com>
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -21,7 +27,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_PKCS5_H
|
#ifndef MBEDTLS_PKCS5_H
|
||||||
#define MBEDTLS_PKCS5_H
|
#define MBEDTLS_PKCS5_H
|
||||||
|
|
|
@ -13,8 +13,14 @@
|
||||||
* dynamically configured at runtime.
|
* dynamically configured at runtime.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -28,7 +34,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_PLATFORM_H
|
#ifndef MBEDTLS_PLATFORM_H
|
||||||
#define MBEDTLS_PLATFORM_H
|
#define MBEDTLS_PLATFORM_H
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief mbed TLS Platform time abstraction
|
* \brief mbed TLS Platform time abstraction
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2016, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_PLATFORM_TIME_H
|
#ifndef MBEDTLS_PLATFORM_TIME_H
|
||||||
#define MBEDTLS_PLATFORM_TIME_H
|
#define MBEDTLS_PLATFORM_TIME_H
|
||||||
|
|
|
@ -5,8 +5,14 @@
|
||||||
* library.
|
* library.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2018, Arm Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -20,7 +26,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_PLATFORM_UTIL_H
|
#ifndef MBEDTLS_PLATFORM_UTIL_H
|
||||||
#define MBEDTLS_PLATFORM_UTIL_H
|
#define MBEDTLS_PLATFORM_UTIL_H
|
||||||
|
|
|
@ -12,8 +12,15 @@
|
||||||
* \author Daniel King <damaki.gh@gmail.com>
|
* \author Daniel King <damaki.gh@gmail.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved.
|
/*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* Copyright The Mbed TLS Contributors
|
||||||
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -27,7 +34,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_POLY1305_H
|
#ifndef MBEDTLS_POLY1305_H
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief RIPE MD-160 message digest
|
* \brief RIPE MD-160 message digest
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_RIPEMD160_H
|
#ifndef MBEDTLS_RIPEMD160_H
|
||||||
#define MBEDTLS_RIPEMD160_H
|
#define MBEDTLS_RIPEMD160_H
|
||||||
|
|
|
@ -10,8 +10,14 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -25,7 +31,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_RSA_H
|
#ifndef MBEDTLS_RSA_H
|
||||||
#define MBEDTLS_RSA_H
|
#define MBEDTLS_RSA_H
|
||||||
|
@ -99,7 +124,10 @@ extern "C" {
|
||||||
*/
|
*/
|
||||||
typedef struct mbedtls_rsa_context
|
typedef struct mbedtls_rsa_context
|
||||||
{
|
{
|
||||||
int ver; /*!< Always 0.*/
|
int ver; /*!< Reserved for internal purposes.
|
||||||
|
* Do not set this field in application
|
||||||
|
* code. Its meaning might change without
|
||||||
|
* notice. */
|
||||||
size_t len; /*!< The size of \p N in Bytes. */
|
size_t len; /*!< The size of \p N in Bytes. */
|
||||||
|
|
||||||
mbedtls_mpi N; /*!< The public modulus. */
|
mbedtls_mpi N; /*!< The public modulus. */
|
||||||
|
@ -129,6 +157,7 @@ typedef struct mbedtls_rsa_context
|
||||||
mask generating function used in the
|
mask generating function used in the
|
||||||
EME-OAEP and EMSA-PSS encodings. */
|
EME-OAEP and EMSA-PSS encodings. */
|
||||||
#if defined(MBEDTLS_THREADING_C)
|
#if defined(MBEDTLS_THREADING_C)
|
||||||
|
/* Invariant: the mutex is initialized iff ver != 0. */
|
||||||
mbedtls_threading_mutex_t mutex; /*!< Thread-safety mutex. */
|
mbedtls_threading_mutex_t mutex; /*!< Thread-safety mutex. */
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,8 +35,14 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2017, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -50,7 +56,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -11,8 +11,14 @@
|
||||||
* digests instead.
|
* digests instead.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -26,7 +32,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_SHA1_H
|
#ifndef MBEDTLS_SHA1_H
|
||||||
#define MBEDTLS_SHA1_H
|
#define MBEDTLS_SHA1_H
|
||||||
|
|
|
@ -7,8 +7,14 @@
|
||||||
* hash functions are defined in <em>FIPS 180-4: Secure Hash Standard (SHS)</em>.
|
* hash functions are defined in <em>FIPS 180-4: Secure Hash Standard (SHS)</em>.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -22,7 +28,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_SHA256_H
|
#ifndef MBEDTLS_SHA256_H
|
||||||
#define MBEDTLS_SHA256_H
|
#define MBEDTLS_SHA256_H
|
||||||
|
|
|
@ -6,8 +6,14 @@
|
||||||
* hash functions are defined in <em>FIPS 180-4: Secure Hash Standard (SHS)</em>.
|
* hash functions are defined in <em>FIPS 180-4: Secure Hash Standard (SHS)</em>.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -21,7 +27,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_SHA512_H
|
#ifndef MBEDTLS_SHA512_H
|
||||||
#define MBEDTLS_SHA512_H
|
#define MBEDTLS_SHA512_H
|
||||||
|
@ -127,8 +152,7 @@ int mbedtls_sha512_update_ret( mbedtls_sha512_context *ctx,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief This function finishes the SHA-512 operation, and writes
|
* \brief This function finishes the SHA-512 operation, and writes
|
||||||
* the result to the output buffer. This function is for
|
* the result to the output buffer.
|
||||||
* internal use only.
|
|
||||||
*
|
*
|
||||||
* \param ctx The SHA-512 context. This must be initialized
|
* \param ctx The SHA-512 context. This must be initialized
|
||||||
* and have a hash operation started.
|
* and have a hash operation started.
|
||||||
|
@ -144,6 +168,7 @@ int mbedtls_sha512_finish_ret( mbedtls_sha512_context *ctx,
|
||||||
/**
|
/**
|
||||||
* \brief This function processes a single data block within
|
* \brief This function processes a single data block within
|
||||||
* the ongoing SHA-512 computation.
|
* the ongoing SHA-512 computation.
|
||||||
|
* This function is for internal use only.
|
||||||
*
|
*
|
||||||
* \param ctx The SHA-512 context. This must be initialized.
|
* \param ctx The SHA-512 context. This must be initialized.
|
||||||
* \param data The buffer holding one block of data. This
|
* \param data The buffer holding one block of data. This
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief SSL/TLS functions.
|
* \brief SSL/TLS functions.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_SSL_H
|
#ifndef MBEDTLS_SSL_H
|
||||||
#define MBEDTLS_SSL_H
|
#define MBEDTLS_SSL_H
|
||||||
|
@ -123,6 +148,7 @@
|
||||||
#define MBEDTLS_ERR_SSL_ASYNC_IN_PROGRESS -0x6500 /**< The asynchronous operation is not completed yet. */
|
#define MBEDTLS_ERR_SSL_ASYNC_IN_PROGRESS -0x6500 /**< The asynchronous operation is not completed yet. */
|
||||||
#define MBEDTLS_ERR_SSL_EARLY_MESSAGE -0x6480 /**< Internal-only message signaling that a message arrived early. */
|
#define MBEDTLS_ERR_SSL_EARLY_MESSAGE -0x6480 /**< Internal-only message signaling that a message arrived early. */
|
||||||
#define MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS -0x7000 /**< A cryptographic operation is in progress. Try again later. */
|
#define MBEDTLS_ERR_SSL_CRYPTO_IN_PROGRESS -0x7000 /**< A cryptographic operation is in progress. Try again later. */
|
||||||
|
#define MBEDTLS_ERR_SSL_BAD_CONFIG -0x5E80 /**< Invalid value in SSL config */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Various constants
|
* Various constants
|
||||||
|
@ -137,6 +163,9 @@
|
||||||
#define MBEDTLS_SSL_TRANSPORT_DATAGRAM 1 /*!< DTLS */
|
#define MBEDTLS_SSL_TRANSPORT_DATAGRAM 1 /*!< DTLS */
|
||||||
|
|
||||||
#define MBEDTLS_SSL_MAX_HOST_NAME_LEN 255 /*!< Maximum host name defined in RFC 1035 */
|
#define MBEDTLS_SSL_MAX_HOST_NAME_LEN 255 /*!< Maximum host name defined in RFC 1035 */
|
||||||
|
#define MBEDTLS_SSL_MAX_ALPN_NAME_LEN 255 /*!< Maximum size in bytes of a protocol name in alpn ext., RFC 7301 */
|
||||||
|
|
||||||
|
#define MBEDTLS_SSL_MAX_ALPN_LIST_LEN 65535 /*!< Maximum size in bytes of list in alpn ext., RFC 7301 */
|
||||||
|
|
||||||
/* RFC 6066 section 4, see also mfl_code_to_length in ssl_tls.c
|
/* RFC 6066 section 4, see also mfl_code_to_length in ssl_tls.c
|
||||||
* NONE must be zero so that memset()ing structure to zero works */
|
* NONE must be zero so that memset()ing structure to zero works */
|
||||||
|
@ -1380,7 +1409,7 @@ void mbedtls_ssl_conf_dbg( mbedtls_ssl_config *conf,
|
||||||
* \note For DTLS, you need to provide either a non-NULL
|
* \note For DTLS, you need to provide either a non-NULL
|
||||||
* f_recv_timeout callback, or a f_recv that doesn't block.
|
* f_recv_timeout callback, or a f_recv that doesn't block.
|
||||||
*
|
*
|
||||||
* \note See the documentations of \c mbedtls_ssl_sent_t,
|
* \note See the documentations of \c mbedtls_ssl_send_t,
|
||||||
* \c mbedtls_ssl_recv_t and \c mbedtls_ssl_recv_timeout_t for
|
* \c mbedtls_ssl_recv_t and \c mbedtls_ssl_recv_timeout_t for
|
||||||
* the conventions those callbacks must follow.
|
* the conventions those callbacks must follow.
|
||||||
*
|
*
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief SSL session cache implementation
|
* \brief SSL session cache implementation
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_SSL_CACHE_H
|
#ifndef MBEDTLS_SSL_CACHE_H
|
||||||
#define MBEDTLS_SSL_CACHE_H
|
#define MBEDTLS_SSL_CACHE_H
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief SSL Ciphersuites for mbed TLS
|
* \brief SSL Ciphersuites for mbed TLS
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_SSL_CIPHERSUITES_H
|
#ifndef MBEDTLS_SSL_CIPHERSUITES_H
|
||||||
#define MBEDTLS_SSL_CIPHERSUITES_H
|
#define MBEDTLS_SSL_CIPHERSUITES_H
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief DTLS cookie callbacks implementation
|
* \brief DTLS cookie callbacks implementation
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_SSL_COOKIE_H
|
#ifndef MBEDTLS_SSL_COOKIE_H
|
||||||
#define MBEDTLS_SSL_COOKIE_H
|
#define MBEDTLS_SSL_COOKIE_H
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
* \brief Internal functions shared by the SSL modules
|
* \brief Internal functions shared by the SSL modules
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
|
*
|
||||||
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
* GNU General Public License v2.0 or later.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* Apache License 2.0:
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
* Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
* not use this file except in compliance with the License.
|
* not use this file except in compliance with the License.
|
||||||
|
@ -19,7 +25,26 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
* **********
|
||||||
|
*
|
||||||
|
* **********
|
||||||
|
* GNU General Public License v2.0 or later:
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*
|
||||||
|
* **********
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_SSL_INTERNAL_H
|
#ifndef MBEDTLS_SSL_INTERNAL_H
|
||||||
#define MBEDTLS_SSL_INTERNAL_H
|
#define MBEDTLS_SSL_INTERNAL_H
|
||||||
|
@ -125,6 +150,24 @@
|
||||||
#define MBEDTLS_SSL_RETRANS_WAITING 2
|
#define MBEDTLS_SSL_RETRANS_WAITING 2
|
||||||
#define MBEDTLS_SSL_RETRANS_FINISHED 3
|
#define MBEDTLS_SSL_RETRANS_FINISHED 3
|
||||||
|
|
||||||
|
/* This macro determines whether CBC is supported. */
|
||||||
|
#if defined(MBEDTLS_CIPHER_MODE_CBC) && \
|
||||||
|
( defined(MBEDTLS_AES_C) || \
|
||||||
|
defined(MBEDTLS_CAMELLIA_C) || \
|
||||||
|
defined(MBEDTLS_ARIA_C) || \
|
||||||
|
defined(MBEDTLS_DES_C) )
|
||||||
|
#define MBEDTLS_SSL_SOME_SUITES_USE_CBC
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* This macro determines whether the CBC construct used in TLS 1.0-1.2 (as
|
||||||
|
* opposed to the very different CBC construct used in SSLv3) is supported. */
|
||||||
|
#if defined(MBEDTLS_SSL_SOME_SUITES_USE_CBC) && \
|
||||||
|
( defined(MBEDTLS_SSL_PROTO_TLS1) || \
|
||||||
|
defined(MBEDTLS_SSL_PROTO_TLS1_1) || \
|
||||||
|
defined(MBEDTLS_SSL_PROTO_TLS1_2) )
|
||||||
|
#define MBEDTLS_SSL_SOME_SUITES_USE_TLS_CBC
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Allow extra bytes for record, authentication and encryption overhead:
|
* Allow extra bytes for record, authentication and encryption overhead:
|
||||||
* counter (8) + header (5) + IV(16) + MAC (16-48) + padding (0-256)
|
* counter (8) + header (5) + IV(16) + MAC (16-48) + padding (0-256)
|
||||||
|
@ -182,6 +225,12 @@
|
||||||
: ( MBEDTLS_SSL_IN_CONTENT_LEN ) \
|
: ( MBEDTLS_SSL_IN_CONTENT_LEN ) \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
/* Maximum size in bytes of list in sig-hash algorithm ext., RFC 5246 */
|
||||||
|
#define MBEDTLS_SSL_MAX_SIG_HASH_ALG_LIST_LEN 65534
|
||||||
|
|
||||||
|
/* Maximum size in bytes of list in supported elliptic curve ext., RFC 4492 */
|
||||||
|
#define MBEDTLS_SSL_MAX_CURVE_LIST_LEN 65535
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check that we obey the standard's message size bounds
|
* Check that we obey the standard's message size bounds
|
||||||
*/
|
*/
|
||||||
|
@ -236,6 +285,41 @@
|
||||||
#define MBEDTLS_TLS_EXT_SUPPORTED_POINT_FORMATS_PRESENT (1 << 0)
|
#define MBEDTLS_TLS_EXT_SUPPORTED_POINT_FORMATS_PRESENT (1 << 0)
|
||||||
#define MBEDTLS_TLS_EXT_ECJPAKE_KKPP_OK (1 << 1)
|
#define MBEDTLS_TLS_EXT_ECJPAKE_KKPP_OK (1 << 1)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief This function checks if the remaining size in a buffer is
|
||||||
|
* greater or equal than a needed space.
|
||||||
|
*
|
||||||
|
* \param cur Pointer to the current position in the buffer.
|
||||||
|
* \param end Pointer to one past the end of the buffer.
|
||||||
|
* \param need Needed space in bytes.
|
||||||
|
*
|
||||||
|
* \return Zero if the needed space is available in the buffer, non-zero
|
||||||
|
* otherwise.
|
||||||
|
*/
|
||||||
|
static inline int mbedtls_ssl_chk_buf_ptr( const uint8_t *cur,
|
||||||
|
const uint8_t *end, size_t need )
|
||||||
|
{
|
||||||
|
return( ( cur > end ) || ( need > (size_t)( end - cur ) ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief This macro checks if the remaining size in a buffer is
|
||||||
|
* greater or equal than a needed space. If it is not the case,
|
||||||
|
* it returns an SSL_BUFFER_TOO_SMALL error.
|
||||||
|
*
|
||||||
|
* \param cur Pointer to the current position in the buffer.
|
||||||
|
* \param end Pointer to one past the end of the buffer.
|
||||||
|
* \param need Needed space in bytes.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
#define MBEDTLS_SSL_CHK_BUF_PTR( cur, end, need ) \
|
||||||
|
do { \
|
||||||
|
if( mbedtls_ssl_chk_buf_ptr( ( cur ), ( end ), ( need ) ) != 0 ) \
|
||||||
|
{ \
|
||||||
|
return( MBEDTLS_ERR_SSL_BUFFER_TOO_SMALL ); \
|
||||||
|
} \
|
||||||
|
} while( 0 )
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
@ -775,6 +859,73 @@ int mbedtls_ssl_get_key_exchange_md_tls1_2( mbedtls_ssl_context *ssl,
|
||||||
#endif /* MBEDTLS_SSL_PROTO_TLS1 || MBEDTLS_SSL_PROTO_TLS1_1 || \
|
#endif /* MBEDTLS_SSL_PROTO_TLS1 || MBEDTLS_SSL_PROTO_TLS1_1 || \
|
||||||
MBEDTLS_SSL_PROTO_TLS1_2 */
|
MBEDTLS_SSL_PROTO_TLS1_2 */
|
||||||
|
|
||||||
|
#if defined(MBEDTLS_SSL_SOME_SUITES_USE_TLS_CBC)
|
||||||
|
/** \brief Compute the HMAC of variable-length data with constant flow.
|
||||||
|
*
|
||||||
|
* This function computes the HMAC of the concatenation of \p add_data and \p
|
||||||
|
* data, and does with a code flow and memory access pattern that does not
|
||||||
|
* depend on \p data_len_secret, but only on \p min_data_len and \p
|
||||||
|
* max_data_len. In particular, this function always reads exactly \p
|
||||||
|
* max_data_len bytes from \p data.
|
||||||
|
*
|
||||||
|
* \param ctx The HMAC context. It must have keys configured
|
||||||
|
* with mbedtls_md_hmac_starts() and use one of the
|
||||||
|
* following hashes: SHA-384, SHA-256, SHA-1 or MD-5.
|
||||||
|
* It is reset using mbedtls_md_hmac_reset() after
|
||||||
|
* the computation is complete to prepare for the
|
||||||
|
* next computation.
|
||||||
|
* \param add_data The additional data prepended to \p data. This
|
||||||
|
* must point to a readable buffer of \p add_data_len
|
||||||
|
* bytes.
|
||||||
|
* \param add_data_len The length of \p add_data in bytes.
|
||||||
|
* \param data The data appended to \p add_data. This must point
|
||||||
|
* to a readable buffer of \p max_data_len bytes.
|
||||||
|
* \param data_len_secret The length of the data to process in \p data.
|
||||||
|
* This must be no less than \p min_data_len and no
|
||||||
|
* greater than \p max_data_len.
|
||||||
|
* \param min_data_len The minimal length of \p data in bytes.
|
||||||
|
* \param max_data_len The maximal length of \p data in bytes.
|
||||||
|
* \param output The HMAC will be written here. This must point to
|
||||||
|
* a writable buffer of sufficient size to hold the
|
||||||
|
* HMAC value.
|
||||||
|
*
|
||||||
|
* \retval 0
|
||||||
|
* Success.
|
||||||
|
* \retval MBEDTLS_ERR_PLATFORM_HW_ACCEL_FAILED
|
||||||
|
* The hardware accelerator failed.
|
||||||
|
*/
|
||||||
|
int mbedtls_ssl_cf_hmac(
|
||||||
|
mbedtls_md_context_t *ctx,
|
||||||
|
const unsigned char *add_data, size_t add_data_len,
|
||||||
|
const unsigned char *data, size_t data_len_secret,
|
||||||
|
size_t min_data_len, size_t max_data_len,
|
||||||
|
unsigned char *output );
|
||||||
|
|
||||||
|
/** \brief Copy data from a secret position with constant flow.
|
||||||
|
*
|
||||||
|
* This function copies \p len bytes from \p src_base + \p offset_secret to \p
|
||||||
|
* dst, with a code flow and memory access pattern that does not depend on \p
|
||||||
|
* offset_secret, but only on \p offset_min, \p offset_max and \p len.
|
||||||
|
*
|
||||||
|
* \param dst The destination buffer. This must point to a writable
|
||||||
|
* buffer of at least \p len bytes.
|
||||||
|
* \param src_base The base of the source buffer. This must point to a
|
||||||
|
* readable buffer of at least \p offset_max + \p len
|
||||||
|
* bytes.
|
||||||
|
* \param offset_secret The offset in the source buffer from which to copy.
|
||||||
|
* This must be no less than \p offset_min and no greater
|
||||||
|
* than \p offset_max.
|
||||||
|
* \param offset_min The minimal value of \p offset_secret.
|
||||||
|
* \param offset_max The maximal value of \p offset_secret.
|
||||||
|
* \param len The number of bytes to copy.
|
||||||
|
*/
|
||||||
|
void mbedtls_ssl_cf_memcpy_offset( unsigned char *dst,
|
||||||
|
const unsigned char *src_base,
|
||||||
|
size_t offset_secret,
|
||||||
|
size_t offset_min, size_t offset_max,
|
||||||
|
size_t len );
|
||||||
|
#endif /* MBEDTLS_SSL_SOME_SUITES_USE_TLS_CBC */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue