Simon Butcher
78da223f68
Revert accidental changes to file mode of rsa.c
2016-06-07 14:52:34 +01:00
Janos Follath
a338691b46
Merge branch 'development' into development-restricted
2016-06-07 09:24:41 +01:00
Simon Butcher
50cdede726
Revert accidental changes to file mode of rsa.c
2016-06-06 20:15:33 +01:00
Janos Follath
0febc80396
Address issues find by manual coverity scan.
2016-06-03 15:40:57 +01:00
Janos Follath
04b591ee79
Merge branch 'development' for weekly test report.
2016-05-31 10:18:41 +01:00
-~- redtangent ~-~
9fa2e86d93
Add missing mbedtls_time_t definitions ( #493 )
...
Add missing mbedtls_time_t definitions to sample applications and the error.c
generation script.
Fixes #490 .
2016-05-26 10:07:49 +01:00
Simon Butcher
9c22e7311c
Merge branch 'development'
2016-05-24 13:25:46 +01:00
Simon Butcher
65b1fa6b07
Fixes warnings found by Clang static analyser
...
Also removes annotations in the code to avoid warnings which don't appear to
be needed.
2016-05-23 23:18:26 +01:00
Simon Butcher
584a547873
Fix whitespace and formatting in ssl_srv.c
2016-05-23 16:24:52 +01:00
Simon Butcher
29176897a1
Adds additional casts to calloc calls
...
Casts added to allow compilation of the library as C++
2016-05-23 14:29:33 +01:00
Simon Butcher
88ffc089bc
Adds casts to zeroize functions to allow building as C++
2016-05-23 14:29:32 +01:00
Simon Butcher
97e829038a
Fixes whitespace errors in x509_crl.c
2016-05-23 14:29:32 +01:00
Brian Murray
930a3701e7
fix indentation in output of selftest.c
2016-05-23 14:29:32 +01:00
Paul Bakker
38d188896c
Cleanup ifdef statements
2016-05-23 14:29:31 +01:00
Simon Butcher
cc4eabd22a
Reverts change in commit daf534d
...
Commit daf534d from PR #457 breaks the build. This may reintroduce a
clang-analyse warning, but this is the wrong fix for that.
The fix removed a call to mbedtls_ecp_curve_info_from_grp_id() to find
the curve info. This fix adds that back in.
2016-05-23 14:29:31 +01:00
Simon Butcher
da01266599
Corrects incorrectly named function in ctr_drbg.c comment
2016-05-23 14:29:31 +01:00
Simon Butcher
80119c5d28
Fixes minor typos in comments in pk.h and ctr_drbg.c
...
Fixes typos in PRs #475 and #437
2016-05-23 14:29:30 +01:00
SimonB
99cff58958
Fixes memory leak in memory_buffer_alloc.c debug
...
Debug symbols were being leaked in memory_buffer_alloc.c
2016-05-23 14:29:29 +01:00
Nicholas Wilson
1b666554c9
Silence a clang-analyze warning
...
The check is already effectively performed later in the function, but
implicitly, so Clang's analysis fail to notice the functions are in
fact safe. Pulling the check up to the top helps Clang to verify the
behaviour.
2016-05-23 14:29:29 +01:00
Nicholas Wilson
f0021645b0
Refactor slightly to silence a clang-analyze warning
...
Since the buffer is used in a few places, it seems Clang isn't clever
enough to realise that the first byte is never touched. So, even though
the function has a correct null check for ssl->handshake, Clang
complains. Pulling the handshake type out into its own variable is
enough for Clang's analysis to kick in though.
2016-05-23 14:29:28 +01:00
Nicholas Wilson
b47fd5e8c9
Remove a dead store to silence clang-analyze
2016-05-23 14:29:28 +01:00
Nicholas Wilson
e735303026
Shut up a few clang-analyze warnings about use of uninitialized variables
...
The functions are all safe, Clang just isn't clever enough to realise
it.
2016-05-23 14:29:28 +01:00
Nicholas Wilson
91c68a5e15
Shut up a clang-analyzer warning
...
The function appears to be safe, since grow() is called with sensible
arguments in previous functions. Ideally Clang would be clever enough to
realise this. Even if N has size MBEDTLS_MPI_MAX_LIMBS, which will
cause the grow to fail, the affected lines in montmul won't be reached.
Having this sanity check can hardly hurt though.
2016-05-23 14:29:28 +01:00
Attila Molnar
2791ba1429
Fix handle leak in mbedtls_platform_entropy_poll() on Windows on error
2016-05-23 14:29:28 +01:00
Alexey Skalozub
c8404607ea
Move K inside MBEDTLS_SHA512_PROCESS_ALT block
...
It is used only by `mbedtls_sha512_process()`, and in case `MBEDTLS_SHA512_PROCESS_ALT` is defined, it still cannot be reused because of `static` declaration.
2016-05-23 14:29:28 +01:00
James Cowgill
5c1e24ca05
Fix build errors on x32 by using the generic 'add' instruction
...
On x32 systems, pointers are 4-bytes wide and are therefore stored in %e?x
registers (instead of %r?x registers). These registers must be accessed using
"addl" instead of "addq", however the GNU assembler will acccept the generic
"add" instruction and determine the correct opcode based on the registers
passed to it.
2016-05-23 14:29:28 +01:00
Janos Follath
c6dab2b029
Fix non compliance SSLv3 in server extension handling.
...
The server code parses the client hello extensions even when the
protocol is SSLv3 and this behaviour is non compliant with rfc6101.
Also the server sends extensions in the server hello and omitting
them may prevent interoperability problems.
2016-05-23 14:27:02 +01:00
Simon Butcher
94bafdf834
Merge branch 'development'
2016-05-18 18:40:46 +01:00
Simon Butcher
db0feca55c
Fixes platform time_t abstraction
...
Fixes platform abstraction in error.c and the file that it's generated
from as well as DTLS samples.
2016-05-17 00:03:14 +01:00
Simon Butcher
c21bec8af4
Merge branch 'development'
2016-05-16 16:15:20 +01:00
Paul Bakker
21cc5741cf
Cleanup ifdef statements
2016-05-12 12:46:28 +01:00
Simon Butcher
2dd49d1e47
Reverts change in commit daf534d
...
Commit daf534d from PR #457 breaks the build. This may reintroduce a
clang-analyse warning, but this is the wrong fix for that.
The fix removed a call to mbedtls_ecp_curve_info_from_grp_id() to find
the curve info. This fix adds that back in.
2016-05-11 23:15:58 +01:00
Paul Bakker
9edf1eb062
Merge pull request #376 from jcowgill/x32
...
Support for x32
2016-05-11 20:40:08 +02:00
Paul Bakker
f4743a6f5e
Merge pull request #457 from NWilson/clang-analyze-fixes
...
Clang analyze fixes
2016-05-11 20:20:42 +02:00
Paul Bakker
e1fbac4ac4
Merge pull request #409 from attilamolnar/fix-handle-leak
...
Fix handle leak in mbedtls_platform_entropy_poll() on Windows on error
2016-05-11 20:14:16 +02:00
Paul Bakker
aaee547547
Merge pull request #402 from pieceofsummer/sha512-process-alt-k
...
Move K inside MBEDTLS_SHA512_PROCESS_ALT block
2016-05-11 20:12:45 +02:00
Simon Butcher
71c7ac5597
Corrects incorrectly named function in ctr_drbg.c comment
2016-05-10 23:47:30 +01:00
Simon Butcher
938f65c452
Merge 'development' into development
2016-05-10 20:58:54 +01:00
Simon Butcher
295639bfa1
Fixes minor typos in comments in pk.h and ctr_drbg.c
...
Fixes typos in PRs #475 and #437
2016-05-10 19:39:36 +01:00
SimonB
4225611887
Fixes memory leak in memory_buffer_alloc.c debug
...
Debug symbols were being leaked in memory_buffer_alloc.c
2016-05-05 14:24:17 +01:00
Simon Butcher
e4a46f696f
Merge branch 'development'
2016-04-27 18:44:37 +01:00
Simon Butcher
3fe6cd3a2d
Fixes time() abstraction for custom configs
...
Added platform abstraction of time() to ChangeLog, version features, and fixed the build for dynamic configuration.
2016-04-26 19:51:29 +01:00
SimonB
d5800b7761
Abstracts away time()/stdlib.h into platform
...
Substitutes time() into a configurable platform interface to allow it to be
easily substituted.
2016-04-26 14:49:59 +01:00
Alexey Skalozub
e17a8da17e
Rename MPI zeroize function to mbedtls_mpi_zeroize
...
Avoid naming confusion
2016-04-25 16:01:07 +01:00
Alexey Skalozub
3d53f41638
Faster mbedtls_zeroize for MPI
...
Writes in `sizeof(mbedtls_mpi_uint)` units perform faster than plain chars, also eliminates multiplication by `ciL`
2016-04-25 16:00:50 +01:00
Janos Follath
8a3170571e
Fix bug in ssl_write_supported_elliptic_curves_ext
...
Passing invalid curves to mbedtls_ssl_conf_curves potentially could caused a
crash later in ssl_write_supported_elliptic_curves_ext. #373
2016-04-22 00:41:54 +01:00
Simon Butcher
2300776816
Merge branch 'development'
2016-04-19 10:39:36 +01:00
Janos Follath
1ed9f99ef3
Fix null pointer dereference in the RSA module.
...
Introduced null pointer checks in mbedtls_rsa_rsaes_pkcs1_v15_encrypt
2016-04-19 10:16:31 +01:00
Simon Butcher
3f5c875654
Adds test for odd bit length RSA key size
...
Also tidy up ChangeLog following review.
2016-04-15 19:06:59 +01:00
Janos Follath
10c575be3e
Fix odd bitlength RSA key generation
...
Fix issue that caused a hang up when generating RSA keys of odd
bitlength.
2016-04-15 18:49:13 +01:00