Janos Follath
347552d8d0
Fix memory leaks in example programs.
2016-05-18 20:08:16 +01:00
Janos Follath
bc68e9c087
Add tests to cover PKCS1 v1.5 signature functions.
...
The reported memory leak should have been spotted by
make memcheck
But it wasn't. Keeping the tests for better coverage.
2016-05-18 20:08:16 +01:00
Simon Butcher
6301f44f3f
Adds test_suite_pkcs1_v15 to tests/Makefile
2016-05-18 20:08:16 +01:00
Simon Butcher
959d4328c1
Fix ChangeLog for backport of IOTSSL-621
2016-05-18 20:08:16 +01:00
Janos Follath
af1836e1cf
Add Changelog entry for current branch
2016-05-18 20:07:27 +01:00
Simon Butcher
49ed628ede
Fix ChangeLog after merging fix for IOTSSL-628
2016-05-18 20:07:27 +01:00
Janos Follath
f383363d43
Extended ChangeLog entry
2016-05-18 20:01:46 +01:00
Janos Follath
c70515d455
Add Changelog entry for current branch
2016-05-18 20:00:19 +01:00
Simon Butcher
f31d9676d1
Fix ChangeLog for backport of IOTSSL-621
2016-05-18 19:58:41 +01:00
Janos Follath
742783fe85
Included tests for the overflow
...
Conflicts:
library/rsa.c
2016-05-18 19:58:41 +01:00
Janos Follath
21ca00243c
Add Changelog entry for current branch
2016-05-18 19:58:41 +01:00
Simon Butcher
d3253b018e
Fix for backprt of IOTSSL-628
...
Corrections to constand and function names changed between 1.3 and 2.1
2016-05-18 19:58:41 +01:00
Simon Butcher
2d49c4d2f6
Fix ChangeLog after merging fix for IOTSSL-628
2016-05-18 19:58:41 +01:00
Janos Follath
7295c189ee
Extended ChangeLog entry
2016-05-18 19:58:41 +01:00
Janos Follath
092f2c48c4
Move underflow test to make time constant
2016-05-18 19:58:41 +01:00
Janos Follath
574b118bf8
Add Changelog entry for current branch
2016-05-18 19:58:40 +01:00
Janos Follath
3bed13df1c
Included test for integer underflow.
2016-05-18 19:58:40 +01:00
Janos Follath
6483af8e42
Fix the broken pkcs1 v1.5 test.
...
The random buffer handed over to the test function was too small
and the remaining bytes were generated by the default (platform
dependant) function.
2016-05-18 19:58:40 +01:00
Janos Follath
8eeecd0444
Fix the backport of pkcs1 v1.5 test suite.
...
The test suite was not properly backported and it remained unnoticed,
because it was not compile due to the change in the naming of the
compile time requirements.
2016-05-18 19:58:40 +01:00
Janos Follath
f18263d78b
Removing 'if' branch from the fix.
...
This new error shouldn't be distinguishable from other padding errors.
Updating 'bad' instead of adding a new 'if' branch.
2016-05-18 19:58:40 +01:00
Janos Follath
7244ecf52e
Add tests for the bug IOTSSL-619.
...
The main goal with these tests is to test the bug in question and
they are not meant to test the entire PKCS#1 v1.5 behaviour. To
achieve full test coverage, further test cases are needed.
2016-05-18 19:58:40 +01:00
Janos Follath
a1ebe662f3
Add Changelog entry for current branch
2016-05-18 19:58:40 +01:00
Janos Follath
f570f7f686
Length check added
2016-05-18 19:58:40 +01:00
Simon Butcher
01660396da
Corrects debug macro in ssl_cli.c
2016-04-22 10:05:50 +01:00
Janos Follath
4e03439e6a
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 09:59:00 +01:00
Janos Follath
7ddc2cdfce
Fix null pointer dereference in the RSA module.
...
Introduced null pointer checks in mbedtls_rsa_rsaes_pkcs1_v15_encrypt
2016-04-19 10:28:24 +01:00
Simon Butcher
e9f842782b
Adds test for odd bit length RSA key size
...
Also tidy up ChangeLog following review.
2016-04-19 10:02:43 +01:00
Janos Follath
d61fc6881a
Fix odd bitlength RSA key generation
...
Fix issue that caused a hang up when generating RSA keys of odd
bitlength.
2016-04-19 09:42:17 +01:00
Janos Follath
4dfecabb97
Update default configuration
...
Change the default settings for SSL and modify the tests accordingly.
2016-03-14 13:40:43 +00:00
Simon Butcher
a91d85e331
Fix for net_usleep() timing selftest on mingw
...
In mingw32, net_usleep() was failing to sleep for the given period, and was
sleeping in microseconds, not milliseconds. Fix backported from mbed TLS 2.x of
using the Win32 Sleep() API call rather than using the timeout of select().
2016-01-15 14:36:08 +00:00
Manuel Pégourié-Gonnard
54f2c490ed
Avoid build errors with -O0 due to assembly
2016-01-08 15:30:03 +01:00
Manuel Pégourié-Gonnard
20715dc73b
Make ar invocation more portable
...
armar doesn't understand the syntax without dash. OTOH, the syntax with dash
is the only one specified by POSIX, and it's accepted by GNU ar, BSD ar (as
bundled with OS X) and armar, so it looks like the most portable syntax.
fixes #386
2016-01-08 15:28:40 +01:00
Manuel Pégourié-Gonnard
faae6d2019
Fix backporting mistakes in previous 5 commits
2016-01-08 15:24:46 +01:00
Manuel Pégourié-Gonnard
40510a3a79
Update ChangeLog for latest PR merged
...
fixes #309
2016-01-08 15:22:41 +01:00
Janos Follath
2db440d2f1
Improved on the previous fix and added a test case to cover both types
...
of carries.
2016-01-08 15:22:05 +01:00
Janos Follath
2b806fad7b
Removed recursion from fix #309 .
2016-01-08 15:20:29 +01:00
Janos Follath
ff5317e99b
Improved on the fix of #309 and extended the test to cover subroutines.
2016-01-08 15:19:14 +01:00
Janos Follath
87f1494809
Tests and fix added for #309 (inplace mpi doubling).
2016-01-08 15:18:03 +01:00
Manuel Pégourié-Gonnard
a3a1cd33d1
Update reference to attack in ChangeLog
...
We couldn't do that before the attack was public
2016-01-08 15:11:12 +01:00
Simon Butcher
84181adae8
Change version number to 1.3.16
...
Changed version for library files and yotta module
2016-01-04 22:49:30 +00:00
Simon Butcher
302c5fed24
Added _ENABLE_MD5_SIGNATURES into features list
...
Specifically, 'POLARSSL_SSL_ENABLE_MD5_SIGNATURES' into version_features.c
2016-01-04 14:41:31 +00:00
Simon Butcher
d7fe6fbd76
Fix for MPI divide on MSVC
...
Resolves multiple platform issues when building bignum.c with Microsoft
Visual Studio.
2016-01-03 22:39:18 +00:00
Simon Butcher
a39690e7bf
Correction to ChangeLog
...
Corrected function name for rsa_rsassa_pkcs1_v15_sign()
2016-01-02 00:49:12 +00:00
Simon Butcher
14400c8fb0
Merge memory leak fix into branch 'mbedtls-1.3'
...
Merge of fix for memory leak in RSA-SSA signing - #372
2016-01-02 00:28:19 +00:00
Simon Butcher
7d3f3a8ac8
Fix for memory leak in RSA-SSA signing
...
Fix in mbedtls_rsa_rsassa_pkcs1_v15_sign() in rsa.c. Resolves github issue #372
2016-01-02 00:03:39 +00:00
Simon Butcher
a192c8f5d8
Merge branch 'iotssl-541-1.3-pathlen-bugfix'
2016-01-01 01:13:45 +00:00
Simon Butcher
caa8b4977c
Merge remote-tracking branch 'origin/misc-1.3' into mbedtls-1.3
2015-12-22 20:15:35 +00:00
Manuel Pégourié-Gonnard
cf16b79238
Avoid seemingly-possible overflow
...
By looking just at that test, it looks like 2 + dn_size could overflow. In
fact that can't happen as that would mean we've read a CA cert of size is too
big to be represented by a size_t.
However, it's best for code to be more obviously free of overflow without
having to reason about the bigger picture.
2015-12-22 20:13:35 +00:00
Simon Butcher
e4ed3475b0
Added integer divide by as separate function
...
Added 64bit integer divided by 32bit integer, with remainder
2015-12-22 15:26:57 +00:00
Manuel Pégourié-Gonnard
c05014459e
Fix wrong length limit in GCM
...
See for example page 8 of
http://csrc.nist.gov/publications/nistpubs/800-38D/SP-800-38D.pdf
The previous constant probably came from a typo as it was 2^26 - 2^5 instead
of 2^36 - 2^5. Clearly the intention was to allow for a constant bigger than
2^32 as the ull suffix and cast to uint64_t show.
fixes #362
2015-12-10 16:34:32 +01:00