mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-08-05 08:21:11 +00:00
Compare commits
347 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 | ||
|
dd5f369328 | ||
|
599a234000 | ||
|
14a5645cbf | ||
|
1d5ef2919b | ||
|
b2eb38d391 | ||
|
afbe3ee87c | ||
|
7e8f1af0a6 | ||
|
d7a4df8341 | ||
|
6d1f0ad7b6 | ||
|
5b13a86e11 | ||
|
a0c9ff3e52 | ||
|
c9914ecd01 | ||
|
c7f8aec493 | ||
|
fc253b38bb |
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -40,4 +40,5 @@ massif-*
|
||||||
/GSYMS
|
/GSYMS
|
||||||
/GTAGS
|
/GTAGS
|
||||||
/TAGS
|
/TAGS
|
||||||
|
/cscope*.out
|
||||||
/tags
|
/tags
|
||||||
|
|
|
@ -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")
|
||||||
|
|
180
ChangeLog
180
ChangeLog
|
@ -1,5 +1,185 @@
|
||||||
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
|
= mbed TLS 2.16.7 branch released 2020-07-01
|
||||||
|
|
||||||
Security
|
Security
|
||||||
|
|
|
@ -3,6 +3,29 @@
|
||||||
This directory contains changelog entries that have not yet been merged
|
This directory contains changelog entries that have not yet been merged
|
||||||
to the changelog file ([`../ChangeLog`](../ChangeLog)).
|
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
|
## Changelog entry file format
|
||||||
|
|
||||||
A changelog entry file must have the extension `*.txt` and must have the
|
A changelog entry file must have the extension `*.txt` and must have the
|
||||||
|
@ -33,8 +56,7 @@ The permitted changelog entry categories are as follows:
|
||||||
Bugfix
|
Bugfix
|
||||||
Changes
|
Changes
|
||||||
|
|
||||||
Use “Changes” for anything that doesn't fit in the other categories, such as
|
Use “Changes” for anything that doesn't fit in the other categories.
|
||||||
performance, documentation and test improvements.
|
|
||||||
|
|
||||||
## How to write a changelog entry
|
## How to write a changelog entry
|
||||||
|
|
||||||
|
@ -49,8 +71,7 @@ Include GitHub issue numbers where relevant. Use the format “#1234” for an
|
||||||
Mbed TLS issue. Add other external references such as CVE numbers where
|
Mbed TLS issue. Add other external references such as CVE numbers where
|
||||||
applicable.
|
applicable.
|
||||||
|
|
||||||
Credit the author of the contribution if the contribution is not a member of
|
Credit bug reporters where applicable.
|
||||||
the Mbed TLS development team. Also credit bug reporters where applicable.
|
|
||||||
|
|
||||||
**Explain why, not how**. Remember that the audience is the users of the
|
**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
|
library, not its developers. In particular, for a bug fix, explain the
|
||||||
|
|
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".
|
9
Makefile
9
Makefile
|
@ -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
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* 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,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Minimal configuration for TLS 1.1 (RFC 4346), implementing only the
|
* Minimal configuration for TLS 1.1 (RFC 4346), implementing only the
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Minimal configuration of features that do not require an entropy source
|
* Minimal configuration of features that do not require an entropy source
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Minimal configuration for TLS NSA Suite B Profile (RFC 6460)
|
* Minimal configuration for TLS NSA Suite B Profile (RFC 6460)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -46,8 +46,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -46,8 +46,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -46,12 +46,10 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @mainpage mbed TLS v2.16.7 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,7 +5,7 @@
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -46,8 +46,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -46,8 +46,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -46,8 +46,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
*
|
*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -46,8 +46,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -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.7"
|
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
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved.
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -62,8 +62,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_AES_H
|
#ifndef MBEDTLS_AES_H
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* 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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -48,8 +48,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_AESNI_H
|
#ifndef MBEDTLS_AESNI_H
|
||||||
#define MBEDTLS_AESNI_H
|
#define MBEDTLS_AESNI_H
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* 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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -49,8 +49,6 @@
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_ARC4_H
|
#ifndef MBEDTLS_ARC4_H
|
||||||
#define MBEDTLS_ARC4_H
|
#define MBEDTLS_ARC4_H
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
* 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
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -51,8 +51,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_ARIA_H
|
#ifndef MBEDTLS_ARIA_H
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_ASN1_H
|
#ifndef MBEDTLS_ASN1_H
|
||||||
#define MBEDTLS_ASN1_H
|
#define MBEDTLS_ASN1_H
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_ASN1_WRITE_H
|
#ifndef MBEDTLS_ASN1_WRITE_H
|
||||||
#define MBEDTLS_ASN1_WRITE_H
|
#define MBEDTLS_ASN1_WRITE_H
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_BASE64_H
|
#ifndef MBEDTLS_BASE64_H
|
||||||
#define MBEDTLS_BASE64_H
|
#define MBEDTLS_BASE64_H
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_BIGNUM_H
|
#ifndef MBEDTLS_BIGNUM_H
|
||||||
#define MBEDTLS_BIGNUM_H
|
#define MBEDTLS_BIGNUM_H
|
||||||
|
@ -90,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,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_BLOWFISH_H
|
#ifndef MBEDTLS_BLOWFISH_H
|
||||||
#define MBEDTLS_BLOWFISH_H
|
#define MBEDTLS_BLOWFISH_H
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Multiply source vector [s] with b, add result
|
* Multiply source vector [s] with b, add result
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_CAMELLIA_H
|
#ifndef MBEDTLS_CAMELLIA_H
|
||||||
#define MBEDTLS_CAMELLIA_H
|
#define MBEDTLS_CAMELLIA_H
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
* 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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -69,8 +69,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_CCM_H
|
#ifndef MBEDTLS_CCM_H
|
||||||
|
@ -177,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.
|
||||||
*
|
*
|
||||||
|
@ -222,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,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_CERTS_H
|
#ifndef MBEDTLS_CERTS_H
|
||||||
#define MBEDTLS_CERTS_H
|
#define MBEDTLS_CERTS_H
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved.
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -54,8 +54,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_CHACHA20_H
|
#ifndef MBEDTLS_CHACHA20_H
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved.
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -54,8 +54,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_CHACHAPOLY_H
|
#ifndef MBEDTLS_CHACHAPOLY_H
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -199,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,7 +8,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -49,8 +49,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_CIPHER_H
|
#ifndef MBEDTLS_CIPHER_H
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -47,8 +47,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_CIPHER_WRAP_H
|
#ifndef MBEDTLS_CIPHER_WRAP_H
|
||||||
#define MBEDTLS_CIPHER_WRAP_H
|
#define MBEDTLS_CIPHER_WRAP_H
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* 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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -48,8 +48,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_CMAC_H
|
#ifndef MBEDTLS_CMAC_H
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -48,8 +48,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* memory footprint.
|
* memory footprint.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2018, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -49,8 +49,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_CONFIG_H
|
#ifndef MBEDTLS_CONFIG_H
|
||||||
|
@ -551,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
|
||||||
*
|
*
|
||||||
|
@ -1712,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
|
||||||
*
|
*
|
||||||
|
@ -2198,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
|
||||||
|
@ -3092,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,7 +38,7 @@
|
||||||
* - \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -79,8 +79,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_CTR_DRBG_H
|
#ifndef MBEDTLS_CTR_DRBG_H
|
||||||
|
@ -216,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
|
||||||
}
|
}
|
||||||
|
@ -226,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 );
|
||||||
|
@ -274,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
|
||||||
|
@ -283,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.
|
||||||
|
@ -307,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.
|
||||||
*/
|
*/
|
||||||
|
@ -373,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.
|
||||||
|
@ -390,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.
|
||||||
|
@ -413,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.
|
||||||
|
@ -441,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,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_DEBUG_H
|
#ifndef MBEDTLS_DEBUG_H
|
||||||
#define MBEDTLS_DEBUG_H
|
#define MBEDTLS_DEBUG_H
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* instead.
|
* instead.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -50,8 +50,6 @@
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_DES_H
|
#ifndef MBEDTLS_DES_H
|
||||||
#define MBEDTLS_DES_H
|
#define MBEDTLS_DES_H
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -85,8 +85,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_DHM_H
|
#ifndef MBEDTLS_DHM_H
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
* 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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -54,8 +54,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_ECDH_H
|
#ifndef MBEDTLS_ECDH_H
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -52,8 +52,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_ECDSA_H
|
#ifndef MBEDTLS_ECDSA_H
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_ECJPAKE_H
|
#ifndef MBEDTLS_ECJPAKE_H
|
||||||
#define MBEDTLS_ECJPAKE_H
|
#define MBEDTLS_ECJPAKE_H
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -56,8 +56,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_ECP_H
|
#ifndef MBEDTLS_ECP_H
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* point arithmetic.
|
* point arithmetic.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2016, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -46,8 +46,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_ENTROPY_H
|
#ifndef MBEDTLS_ENTROPY_H
|
||||||
#define MBEDTLS_ENTROPY_H
|
#define MBEDTLS_ENTROPY_H
|
||||||
|
@ -149,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,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_ENTROPY_POLL_H
|
#ifndef MBEDTLS_ENTROPY_POLL_H
|
||||||
#define MBEDTLS_ENTROPY_POLL_H
|
#define MBEDTLS_ENTROPY_POLL_H
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_ERROR_H
|
#ifndef MBEDTLS_ERROR_H
|
||||||
#define MBEDTLS_ERROR_H
|
#define MBEDTLS_ERROR_H
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -53,8 +53,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_GCM_H
|
#ifndef MBEDTLS_GCM_H
|
||||||
|
@ -184,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
|
||||||
|
@ -312,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,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_HAVEGE_H
|
#ifndef MBEDTLS_HAVEGE_H
|
||||||
#define MBEDTLS_HAVEGE_H
|
#define MBEDTLS_HAVEGE_H
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* 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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -48,8 +48,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_HKDF_H
|
#ifndef MBEDTLS_HKDF_H
|
||||||
#define MBEDTLS_HKDF_H
|
#define MBEDTLS_HKDF_H
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* 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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -49,8 +49,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_HMAC_DRBG_H
|
#ifndef MBEDTLS_HMAC_DRBG_H
|
||||||
#define MBEDTLS_HMAC_DRBG_H
|
#define MBEDTLS_HMAC_DRBG_H
|
||||||
|
@ -130,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;
|
||||||
|
@ -140,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 );
|
||||||
|
@ -175,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
|
||||||
|
@ -214,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
|
||||||
|
@ -277,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.
|
||||||
|
@ -293,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
|
||||||
|
@ -318,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.
|
||||||
|
@ -347,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.
|
||||||
|
@ -363,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,7 +6,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -47,8 +47,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_MD_H
|
#ifndef MBEDTLS_MD_H
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* instead.
|
* instead.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -50,8 +50,6 @@
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_MD2_H
|
#ifndef MBEDTLS_MD2_H
|
||||||
#define MBEDTLS_MD2_H
|
#define MBEDTLS_MD2_H
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* instead.
|
* instead.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -50,8 +50,6 @@
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_MD4_H
|
#ifndef MBEDTLS_MD4_H
|
||||||
#define MBEDTLS_MD4_H
|
#define MBEDTLS_MD4_H
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* digests instead.
|
* digests instead.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -49,8 +49,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_MD5_H
|
#ifndef MBEDTLS_MD5_H
|
||||||
#define MBEDTLS_MD5_H
|
#define MBEDTLS_MD5_H
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -49,8 +49,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_MD_WRAP_H
|
#ifndef MBEDTLS_MD_WRAP_H
|
||||||
#define MBEDTLS_MD_WRAP_H
|
#define MBEDTLS_MD_WRAP_H
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#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,7 +6,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -47,8 +47,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#if !defined(MBEDTLS_CONFIG_FILE)
|
#if !defined(MBEDTLS_CONFIG_FILE)
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -61,8 +61,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_NET_SOCKETS_H
|
#ifndef MBEDTLS_NET_SOCKETS_H
|
||||||
#define MBEDTLS_NET_SOCKETS_H
|
#define MBEDTLS_NET_SOCKETS_H
|
||||||
|
@ -153,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
|
||||||
*
|
*
|
||||||
|
@ -172,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
|
||||||
|
@ -184,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
|
||||||
|
@ -265,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,7 +16,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2018, Arm Limited (or its affiliates), All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -57,8 +57,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_NIST_KW_H
|
#ifndef MBEDTLS_NIST_KW_H
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_OID_H
|
#ifndef MBEDTLS_OID_H
|
||||||
#define MBEDTLS_OID_H
|
#define MBEDTLS_OID_H
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
* 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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -49,8 +49,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_PADLOCK_H
|
#ifndef MBEDTLS_PADLOCK_H
|
||||||
#define MBEDTLS_PADLOCK_H
|
#define MBEDTLS_PADLOCK_H
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_PEM_H
|
#ifndef MBEDTLS_PEM_H
|
||||||
#define MBEDTLS_PEM_H
|
#define MBEDTLS_PEM_H
|
||||||
|
@ -139,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,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_PK_H
|
#ifndef MBEDTLS_PK_H
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_PK_WRAP_H
|
#ifndef MBEDTLS_PK_WRAP_H
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -47,8 +47,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_PKCS11_H
|
#ifndef MBEDTLS_PKCS11_H
|
||||||
#define MBEDTLS_PKCS11_H
|
#define MBEDTLS_PKCS11_H
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_PKCS12_H
|
#ifndef MBEDTLS_PKCS12_H
|
||||||
#define MBEDTLS_PKCS12_H
|
#define MBEDTLS_PKCS12_H
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -47,8 +47,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_PKCS5_H
|
#ifndef MBEDTLS_PKCS5_H
|
||||||
#define MBEDTLS_PKCS5_H
|
#define MBEDTLS_PKCS5_H
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
* 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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -54,8 +54,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_PLATFORM_H
|
#ifndef MBEDTLS_PLATFORM_H
|
||||||
#define MBEDTLS_PLATFORM_H
|
#define MBEDTLS_PLATFORM_H
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_PLATFORM_TIME_H
|
#ifndef MBEDTLS_PLATFORM_TIME_H
|
||||||
#define MBEDTLS_PLATFORM_TIME_H
|
#define MBEDTLS_PLATFORM_TIME_H
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
* library.
|
* library.
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2018, Arm Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -46,8 +46,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_PLATFORM_UTIL_H
|
#ifndef MBEDTLS_PLATFORM_UTIL_H
|
||||||
#define MBEDTLS_PLATFORM_UTIL_H
|
#define MBEDTLS_PLATFORM_UTIL_H
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved.
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -54,8 +54,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_POLY1305_H
|
#ifndef MBEDTLS_POLY1305_H
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_RIPEMD160_H
|
#ifndef MBEDTLS_RIPEMD160_H
|
||||||
#define MBEDTLS_RIPEMD160_H
|
#define MBEDTLS_RIPEMD160_H
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2018, Arm Limited (or its affiliates), All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -51,8 +51,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_RSA_H
|
#ifndef MBEDTLS_RSA_H
|
||||||
#define MBEDTLS_RSA_H
|
#define MBEDTLS_RSA_H
|
||||||
|
@ -126,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. */
|
||||||
|
@ -156,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,7 +35,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2017, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -77,8 +77,6 @@
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
*
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef MBEDTLS_RSA_INTERNAL_H
|
#ifndef MBEDTLS_RSA_INTERNAL_H
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
* 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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -52,8 +52,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_SHA1_H
|
#ifndef MBEDTLS_SHA1_H
|
||||||
#define MBEDTLS_SHA1_H
|
#define MBEDTLS_SHA1_H
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* 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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -48,8 +48,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_SHA256_H
|
#ifndef MBEDTLS_SHA256_H
|
||||||
#define MBEDTLS_SHA256_H
|
#define MBEDTLS_SHA256_H
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* 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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -47,8 +47,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of Mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_SHA512_H
|
#ifndef MBEDTLS_SHA512_H
|
||||||
#define MBEDTLS_SHA512_H
|
#define MBEDTLS_SHA512_H
|
||||||
|
@ -154,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.
|
||||||
|
@ -171,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,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_SSL_H
|
#ifndef MBEDTLS_SSL_H
|
||||||
#define MBEDTLS_SSL_H
|
#define MBEDTLS_SSL_H
|
||||||
|
@ -1411,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,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_SSL_CACHE_H
|
#ifndef MBEDTLS_SSL_CACHE_H
|
||||||
#define MBEDTLS_SSL_CACHE_H
|
#define MBEDTLS_SSL_CACHE_H
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_SSL_CIPHERSUITES_H
|
#ifndef MBEDTLS_SSL_CIPHERSUITES_H
|
||||||
#define MBEDTLS_SSL_CIPHERSUITES_H
|
#define MBEDTLS_SSL_CIPHERSUITES_H
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_SSL_COOKIE_H
|
#ifndef MBEDTLS_SSL_COOKIE_H
|
||||||
#define MBEDTLS_SSL_COOKIE_H
|
#define MBEDTLS_SSL_COOKIE_H
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \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 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_SSL_INTERNAL_H
|
#ifndef MBEDTLS_SSL_INTERNAL_H
|
||||||
#define MBEDTLS_SSL_INTERNAL_H
|
#define MBEDTLS_SSL_INTERNAL_H
|
||||||
|
@ -152,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)
|
||||||
|
@ -843,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
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \brief TLS server ticket callbacks implementation
|
* \brief TLS server ticket callbacks implementation
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_SSL_TICKET_H
|
#ifndef MBEDTLS_SSL_TICKET_H
|
||||||
#define MBEDTLS_SSL_TICKET_H
|
#define MBEDTLS_SSL_TICKET_H
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \brief Threading abstraction layer
|
* \brief Threading abstraction layer
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_THREADING_H
|
#ifndef MBEDTLS_THREADING_H
|
||||||
#define MBEDTLS_THREADING_H
|
#define MBEDTLS_THREADING_H
|
||||||
|
@ -75,6 +73,9 @@ extern "C" {
|
||||||
typedef struct mbedtls_threading_mutex_t
|
typedef struct mbedtls_threading_mutex_t
|
||||||
{
|
{
|
||||||
pthread_mutex_t mutex;
|
pthread_mutex_t mutex;
|
||||||
|
/* is_valid is 0 after a failed init or a free, and nonzero after a
|
||||||
|
* successful init. This field is not considered part of the public
|
||||||
|
* API of Mbed TLS and may change without notice. */
|
||||||
char is_valid;
|
char is_valid;
|
||||||
} mbedtls_threading_mutex_t;
|
} mbedtls_threading_mutex_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \brief Portable interface to timeouts and to the CPU cycle counter
|
* \brief Portable interface to timeouts and to the CPU cycle counter
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_TIMING_H
|
#ifndef MBEDTLS_TIMING_H
|
||||||
#define MBEDTLS_TIMING_H
|
#define MBEDTLS_TIMING_H
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \brief Run-time version information
|
* \brief Run-time version information
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* This set of compile-time defines and run-time variables can be used to
|
* This set of compile-time defines and run-time variables can be used to
|
||||||
|
@ -67,16 +65,16 @@
|
||||||
*/
|
*/
|
||||||
#define MBEDTLS_VERSION_MAJOR 2
|
#define MBEDTLS_VERSION_MAJOR 2
|
||||||
#define MBEDTLS_VERSION_MINOR 16
|
#define MBEDTLS_VERSION_MINOR 16
|
||||||
#define MBEDTLS_VERSION_PATCH 7
|
#define MBEDTLS_VERSION_PATCH 10
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The single version number has the following structure:
|
* The single version number has the following structure:
|
||||||
* MMNNPP00
|
* MMNNPP00
|
||||||
* Major version | Minor version | Patch version
|
* Major version | Minor version | Patch version
|
||||||
*/
|
*/
|
||||||
#define MBEDTLS_VERSION_NUMBER 0x02100700
|
#define MBEDTLS_VERSION_NUMBER 0x02100A00
|
||||||
#define MBEDTLS_VERSION_STRING "2.16.7"
|
#define MBEDTLS_VERSION_STRING "2.16.10"
|
||||||
#define MBEDTLS_VERSION_STRING_FULL "mbed TLS 2.16.7"
|
#define MBEDTLS_VERSION_STRING_FULL "mbed TLS 2.16.10"
|
||||||
|
|
||||||
#if defined(MBEDTLS_VERSION_C)
|
#if defined(MBEDTLS_VERSION_C)
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \brief X.509 generic defines and structures
|
* \brief X.509 generic defines and structures
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_X509_H
|
#ifndef MBEDTLS_X509_H
|
||||||
#define MBEDTLS_X509_H
|
#define MBEDTLS_X509_H
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
* \brief X.509 certificate revocation list parsing
|
* \brief X.509 certificate revocation list parsing
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2006-2015, ARM Limited, All Rights Reserved
|
* Copyright The Mbed TLS Contributors
|
||||||
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
|
||||||
*
|
*
|
||||||
* This file is provided under the Apache License 2.0, or the
|
* This file is provided under the Apache License 2.0, or the
|
||||||
|
@ -45,8 +45,6 @@
|
||||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
*
|
*
|
||||||
* **********
|
* **********
|
||||||
*
|
|
||||||
* This file is part of mbed TLS (https://tls.mbed.org)
|
|
||||||
*/
|
*/
|
||||||
#ifndef MBEDTLS_X509_CRL_H
|
#ifndef MBEDTLS_X509_CRL_H
|
||||||
#define MBEDTLS_X509_CRL_H
|
#define MBEDTLS_X509_CRL_H
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue