Commit graph

1585 commits

Author SHA1 Message Date
Simon Butcher 441c55d5df Merge remote-tracking branch 'public/pr/2145' into mbedtls-2.1 2018-12-20 01:24:35 +00:00
Simon Butcher bfc26104ad Merge remote-tracking branch 'public/pr/2103' into mbedtls-2.1 2018-12-20 01:21:44 +00:00
Jaeden Amero c51b3388c1 Merge remote-tracking branch 'upstream-public/pr/2065' into mbedtls-2.1 2018-12-06 15:57:37 +00:00
Jaeden Amero f3b18bd07f Merge remote-tracking branch 'upstream-public/pr/1983' into mbedtls-2.1 2018-12-06 15:54:30 +00:00
Simon Butcher 67301e894a Update library version number to 2.1.17 2018-12-02 12:30:30 +00:00
Simon Butcher cf33e2ef00 Update library version number to 2.1.16 2018-11-19 18:33:24 +00:00
Simon Butcher 7ae3c20f93 Merge remote-tracking branch 'public/pr/2152' into mbedtls-2.1-proposed 2018-11-06 23:36:59 +00:00
Hanno Becker 6e7d5abe06 Correct typo in documentation of MBEDTLS_SSL_RENEGOTIATION 2018-10-30 09:39:06 +00:00
Hanno Becker 25422e1f02 Improve documentation of mbedtls_ssl_get_verify_result()
Fixes #517.
2018-10-30 09:35:43 +00:00
Manuel Pégourié-Gonnard 162f682db3 Clarify documentation of ssl_set_own_cert()
fixes #507
2018-10-29 11:12:27 +01:00
Hanno Becker b46e733b90 Correct typo MBEDTLS_ASN1PARSE_C -> MBEDTLS_ASN1_PARSE_C 2018-10-25 14:37:35 +01:00
Hanno Becker 4577beb945 Add dep of mbedtls_rsa_rsassa_pkcs1_v15_verify on ASN.1 parsing 2018-10-16 14:06:20 +01:00
Hanno Becker 5e0f4a5e48 Guard mbedtls_pkcs5_pbes2() by MBEDTLS_ASN1_PARSE_C
Previously, mbedtls_pkcs5_pbes2() was unconditionally declared
in `pkcs5.h` but defined as a stub returning
`MBEDTLS_ERR_PKCS5_FEATURE_UNAVAILABLE` in case
MBEDTLS_ASN1_PARSE_C was not defined.

In line with the previous commits, this commit removes declaration
and definition from both `pkcs5.h` and `pkcs5.c` in case
MBEDTLS_ASN1_PARSE_C is not defined.
2018-10-16 13:57:57 +01:00
Hanno Becker 027c1f2470 Make PBE-related parts of PKCS12 depend on MBEDTLS_ASN1_PARSE_C 2018-10-16 13:57:53 +01:00
Hanno Becker bc9ae7a7ae Guard PK-parse module by ASN.1-parse module in check_config.h 2018-10-16 13:57:30 +01:00
Simon Butcher 1d533cab6e Strip trailing whitespace in bn_mul.h
Remove the trailing whitespace from the inline assembly for AMD64 target, to
overcome a warning in Clang, which was objecting to the string literal
generated by the inline assembly being greater than 4096 characters specified
by the ISO C99 standard. (-Woverlength-strings)

This is a cosmetic change and doesn't change the logic of the code in any way.

This change only fixes the problem for AMD64 target, and leaves other targets as
they are.

Fixes #482.
2018-10-06 18:13:04 +01:00
Simon Butcher d3a5393a38 Update library version number to 2.1.15 2018-08-31 16:10:48 +01:00
Hanno Becker 6a13b9ed26 Improve documentation of mbedtls_x509_crt_parse() 2018-08-24 10:01:52 +01:00
Hanno Becker 335792e1cc Improve wording 2018-08-23 16:14:58 +01:00
Hanno Becker 3a058e52dd Improve documentation of mbedtls_x509_crt_parse()
Fixes #1883.
2018-08-23 15:52:27 +01:00
Jaeden Amero dcec5bb527 Update version to 2.1.14 2018-07-25 15:42:55 +01:00
Simon Butcher 3661642a49 Merge remote-tracking branch 'public/pr/1804' into mbedtls-2.1 2018-07-24 13:17:26 +01:00
Simon Butcher e9a437fe59 Correct logic to exclude i386 inline assenbly when -O0
The i386 MPI inline assembly code was being incorrectly included when
all compiler optimisation was disabled.
2018-07-23 13:42:05 +01:00
Simon Butcher c098ec3af6 Merge remote-tracking branch 'public/pr/1779' into mbedtls-2.1 2018-07-20 14:47:37 +01:00
Simon Butcher f11daf6ff6 Merge remote-tracking branch 'public/pr/1850' into mbedtls-2.1 2018-07-19 16:14:44 +01:00
Ron Eldor 99b9f12a91 Repharse comments
Rephrase comments to clarify them.
2018-07-17 13:31:57 +03:00
Simon Butcher 4171347709 Disable use of the i386 assembly for option -O0
We don't compile in the assembly code if compiler optimisations are disabled as
the number of registers used in the assembly code doesn't work with the -O0
option. Also anyone select -O0 probably doesn't want to compile in the assembly
code anyway.
2018-07-10 23:02:27 +01:00
Simon Butcher cdad40dfce Add ebx to the i386 clobber list for MPI assembly
This fix adds the ebx register to the clobber list for the i386 inline assembly
for the multiply helper function.

ebx was used but not listed, so when the compiler chose to also use it, ebx was
getting corrupted. I'm surprised this wasn't spotted sooner.

Fixes Github issues #1550.
2018-07-10 23:00:38 +01:00
Simon Butcher 57e9fe2df4 Merge remote-tracking branch 'public/pr/1808' into mbedtls-2.1 2018-07-10 14:59:56 +01:00
Ron Eldor 5c8e588444 Minor fixes
1. Rephrase ChangeLog entry.
2. Add a full stop at the end of the fuinction documentation.
2018-07-05 14:59:23 +03:00
Simon Butcher e5828ce06c Merge remote-tracking branch 'public/pr/1771' into mbedtls-2.1 2018-06-28 11:38:18 +01:00
Ron Eldor 112e32230e Move definition to cipher.h
Define `MBEDTLS_CIPHER_MODE_STREAM` for `MBEDTLS_CIPHER_NULL_CIPHER`
as well, in cipher.h. Remove redundant definition in `cipher_internal.h`
2018-06-28 08:52:07 +03:00
Ron Eldor 3dfbf406e5 Move definition of MBEDTLS_CIPHER_MODE_STREAM
Move definition of `MBEDTLS_CIPHER_MODE_STREAM` to header file
(`mbedtls_cipher_internal.h`), because it is used by more than
one file. Raised by TrinityTonic in #1719
2018-06-28 08:49:25 +03:00
Ron Eldor 254530f2e0 Documentation error in mbedtls_ssl_get_session
Fix Documentation error in `mbedtls_ssl_get_session`.
This function supports deep copying of the session,
and the peer certificate is not lost anymore, Resolves #926
2018-06-27 17:51:56 +03:00
Ron Eldor 2c8a7ec0dd Remove unneeded namesapcing in header files
Remove the `mbedtls` namesapcing in the `#include` in header files
Resolves issue #857
2018-06-24 17:20:40 +03:00
Simon Butcher ad761c45b9 Fix multiple quality issues in the source
This PR fixes multiple issues in the source code to address issues raised by
tests/scripts/check-files.py. Specifically:
 * incorrect file permissions
 * missing newline at the end of files
 * trailing whitespace
 * Tabs present
 * TODOs in the souce code
2018-06-22 11:22:44 +01:00
Andres Amaya Garcia b4d008430c Allow 0 as a valid ret value for mbedtls_ssl_write
This patch modifies the documentation for mbedtls_ssl_write() to allow
0 as a valid return value as this is the correct number of bytes that
should be returned when an empty TLS Application record is sent.
2018-06-21 19:37:13 +01:00
Simon Butcher 6fc9ceece3 Change the library version to 2.1.13 2018-06-18 14:49:02 +01:00
Simon Butcher 0a715b1587 Merge remote-tracking branch 'public/pr/1656' into mbedtls-2.1 2018-06-17 18:02:57 +01:00
Zach van Rijn 7cea62b8ad Fix MicroBlaze register typo. 2018-06-15 07:40:03 +01:00
Azim Khan c57d0e5ed5 Treat warnings as errors for IAR
Fix IAR compiler warnings

Two warnings have been fixed:
1. code 'if( len <= 0xFFFFFFFF )' gave warning 'pointless integer comparison'.
   This was fixed by wraping the condition in '#if SIZE_MAX > 0xFFFFFFFF'.
2. code 'diff |= A[i] ^ B[i];' gave warning 'the order of volatile accesses is undefined in'.
   This was fixed by read the volatile data in temporary variables before the computation.

Explain IAR warning on volatile access

Consistent use of CMAKE_C_COMPILER_ID
2018-06-14 08:48:49 +01:00
Simon Butcher 29298cbf8c Merge remote-tracking branch 'public/pr/1671' into mbedtls-2.1 2018-06-12 18:36:39 +01:00
Simon Butcher a5fb40d9f9 Merge remote-tracking branch 'public/pr/1465' into mbedtls-2.1 2018-06-11 11:49:28 +01:00
Gilles Peskine 5b256af2f2 mbedtls_gcm_crypt_and_tag: clarify what each mode does and doesn't do 2018-06-07 15:05:03 +02:00
Gilles Peskine bfc3b74674 Correct and clarify the documentation of GCM whole-message functions
Clarify the roles of the buffer parameter and their sizes.

Document the possible error codes.

Warn that mbedtls_gcm_crypt_and_tag in decrypt mode does not
authenticate the data and recommend using mbedtls_gcm_auth_decrypt
instead.
2018-06-06 16:58:02 +02:00
Simon Butcher fcc7a62bb1 Merge remote-tracking branch 'public/pr/1403' into mbedtls-2.1 2018-06-01 19:43:55 +01:00
Moran Peker 6981df59e7 Remove double declaration of mbedtls_ssl_list_ciphersuites
Raised by TrinityTonic. #1359
2018-05-23 18:42:36 +01:00
Andres AG 879e62697e Allow the entry_name size to be set in config.h
Allow the size of the entry_name character array in x509_crt.c to be
configurable through a macro in config.h. entry_name holds a
path/filename string. The macro introduced in
MBEDTLS_X509_MAX_FILE_PATH_LEN.
2018-05-11 16:38:38 +01:00
Jaeden Amero 753afd85a1 Merge remote-tracking branch 'upstream-public/pr/1585' into mbedtls-2.1-proposed 2018-05-04 11:09:28 +01:00
Jaeden Amero 6c0fba4350 Update version to 2.1.12 2018-04-27 13:13:54 +01:00