Commit Graph

1001 Commits

Author SHA1 Message Date
Hanno Becker
f690ffa53c Fix ordering of free()ing of internal structures in ssl_server2
If `MBEDTLS_MEMORY_BUFFER_ALLOC_C` is configured and Mbed TLS'
custom buffer allocator is used for calloc() and free(), the
read buffer used by the server example application is allocated
from the buffer allocator, but freed after the buffer allocator
has been destroyed. If memory backtracing is enabled, this leaves
a memory leak in the backtracing structure allocated for the buffer,
as found by valgrind.

Fixes #2069.
2018-10-09 12:45:46 +01:00
Andrzej Kurek
3d5cd4ec0a Remove trailing whitespace 2018-09-26 22:53:13 +01:00
Andrzej Kurek
216b40de9b ssl_server2: add buffer overhead for a termination character
Switch to mbedtls style of memory allocation
2018-09-26 22:53:12 +01:00
Andrzej Kurek
557335e56d Added buffer_size and response_size options for ssl-server2.
Added appropriate tests.
2018-09-26 22:53:12 +01:00
Simon Butcher
9863afc5e2 Merge remote-tracking branch 'public/pr/1899' into mbedtls-2.7 2018-09-26 22:00:02 +01:00
Simon Butcher
fbd0ccc0f0 Merge remote-tracking branch 'public/pr/1978' into mbedtls-2.7 2018-08-28 12:32:21 +01:00
Hanno Becker
063c50df8a pk_encrypt: Uniformize debugging output 2018-08-23 15:57:15 +01:00
Hanno Becker
45d006a9cc Fix typos in programs/x509/cert_write.c
Fixes #1922.
2018-08-23 15:27:21 +01:00
Hanno Becker
6953ac2dbe Minor formatting improvements in pk_encrypt and pk_decrypt examples 2018-08-23 15:14:52 +01:00
Hanno Becker
a82a6e126d Correct memory leak in pk_decrypt example program 2018-08-23 15:14:50 +01:00
Hanno Becker
20fce25f28 Correct memory-leak in pk_encrypt example program 2018-08-23 15:14:50 +01:00
Mohammad Azim Khan
7e84affb45 Fix Wformat-overflow warning in ssl_mail_client.c
sprintf( (char *) buf, "%s\r\n", base );
 Above code generates Wformat-overflow warning since both buf and base
are of same size. buf should be sizeof( base ) + characters added in
the format. In this case format 2 bytes for "\r\n".
2018-08-16 14:34:15 +01:00
Ron Eldor
f19a7ab45d Fix hmac_drbg failure in benchmark, with threading
Remove redunadnat calls to `hmac_drbg_free()` between seeding operations,
which make the mutex invalid. Fixes #1095
2018-07-30 11:13:18 +03:00
Simon Butcher
1bb41e5d04 Merge remote-tracking branch 'public/pr/1800' into mbedtls-2.7 2018-07-24 13:30:40 +01:00
Simon Butcher
d5a3ed36b8 Merge remote-tracking branch 'public/pr/1863' into mbedtls-2.7 2018-07-24 12:57:15 +01:00
Andres Amaya Garcia
46a6d5cbe5 Fix ssl_client2 to send 0-length app data 2018-07-16 20:14:45 +01:00
Andres Amaya Garcia
808a09ca85 Remove redundant ret = 1 in dh_client.c 2018-07-10 17:34:25 +01:00
Andres Amaya Garcia
cfb61b33cf Add missing platform macro defines in cert_app.c 2018-07-10 17:34:25 +01:00
Andres Amaya Garcia
9f92a805e9 Add missing platform macro defines in pk_decrypt.c 2018-07-10 17:34:25 +01:00
Andres Amaya Garcia
2b0599bc91 Fix typo in platform macro defines for examples 2018-07-10 17:34:25 +01:00
Andres Amaya Garcia
0dcc6a9f7d Fix ret code in gen_random_havege.c 2018-07-10 17:34:25 +01:00
Andres Amaya Garcia
053e1cd7ab Fix ret code in rsa_encrypt.c 2018-07-10 17:34:25 +01:00
Andres Amaya Garcia
156099b76f Fix ret code in rsa_decrypt.c 2018-07-10 17:34:25 +01:00
Andres Amaya Garcia
8ec767c042 Fix ret code in cert_app.c 2018-07-10 17:34:25 +01:00
Andres Amaya Garcia
77d2de223c Fix ret code in generic_sum.c 2018-07-10 17:34:24 +01:00
Andres Amaya Garcia
2702000d2c Fix ret code in pk_verify.c 2018-07-10 17:34:24 +01:00
Andres Amaya Garcia
a5236b1dd3 Fix ret code in pk_sign.c 2018-07-10 17:34:24 +01:00
Andres Amaya Garcia
a0ea01d273 Fix ret code in pk_encrypt.c 2018-07-10 17:34:24 +01:00
Andres Amaya Garcia
141b4f4526 Fix ret code in pk_encrypt.c 2018-07-10 17:34:24 +01:00
Andres Amaya Garcia
81982c84d4 Fix ret code in ecdh_curve25519.c 2018-07-10 17:34:24 +01:00
Andres Amaya Garcia
c899c464f6 Fix ret code in mpi_demo.c 2018-07-10 17:34:24 +01:00
Andres Amaya Garcia
6118adab09 Fix ret code in pem2der.c 2018-07-10 17:34:24 +01:00
Andres Amaya Garcia
73081c3e2f Fix ret code in ssl_cert_test.c 2018-07-10 17:34:24 +01:00
Andres Amaya Garcia
01e3d21350 Fix ret code in udp_proxy.c 2018-07-10 17:34:24 +01:00
Andres Amaya Garcia
12ab7a6884 Fix ret code in req_app.c 2018-07-10 17:34:24 +01:00
Andres Amaya Garcia
8fe4d917f7 Fix ret code in crl_app.c 2018-07-10 17:34:24 +01:00
Andres Amaya Garcia
a7ac5ab2ee Fix ret code in cert_write.c 2018-07-10 17:34:24 +01:00
Andres Amaya Garcia
7bd88dc44c Fix ret code in cert_req.c 2018-07-10 17:34:24 +01:00
Andres Amaya Garcia
ea14fe76d5 Fix ret code in ssl_mail_client.c 2018-07-10 17:34:24 +01:00
Andres Amaya Garcia
e4f79e1902 Fix ret code in ssl_fork_server.c 2018-07-10 17:34:24 +01:00
Andres Amaya Garcia
bc1af79add Fix ret code in ssl_client1.c 2018-07-10 17:34:24 +01:00
Andres Amaya Garcia
ac0e3e7b11 Fix ret code in gen_random_ctr_drbg.c 2018-07-10 17:34:24 +01:00
Andres Amaya Garcia
43e65fbbca Fix ret code in gen_entropy.c 2018-07-10 17:34:24 +01:00
Andres Amaya Garcia
1b04390e4f Fix ret code in rsa_verify_pss.c 2018-07-10 17:34:24 +01:00
Andres Amaya Garcia
1e36af911b Fix ret code in rsa_verify.c 2018-07-10 17:34:24 +01:00
Andres Amaya Garcia
0b20b4e4cd Fix ret code in rsa_sign_pss.c 2018-07-10 17:34:24 +01:00
Andres Amaya Garcia
39e1964960 Fix ret code in rsa_sign.c 2018-07-10 17:34:24 +01:00
Andres Amaya Garcia
a8a96ae42f Fix ret code in rsa_genkey.c 2018-07-10 17:34:24 +01:00
Andres Amaya Garcia
aa3291e1fb Fix ret code in key_app_writer.c 2018-07-10 17:34:24 +01:00
Andres Amaya Garcia
f57bccf839 Fix ret code in key_app.c 2018-07-10 17:34:24 +01:00