Hanno Becker
d3e4244caf
Add explicit integer to enumeration casts to programs/pkey/gen_key.c
...
Fixes #2170 .
2018-11-06 13:37:46 +00:00
Simon Butcher
4acdf6dea8
Merge remote-tracking branch 'public/pr/1298' into mbedtls-2.1-proposed
2018-10-28 18:17:00 +00:00
Hanno Becker
badbe80c7f
pk_encrypt: Uniformize debugging output
2018-08-23 15:56:55 +01:00
Hanno Becker
b31e9dad60
Minor formatting improvements in pk_encrypt and pk_decrypt examples
2018-08-23 15:13:12 +01:00
Hanno Becker
7cee15e967
Correct memory leak in pk_decrypt example program
2018-08-23 15:12:23 +01:00
Hanno Becker
34cbd7e536
Correct memory-leak in pk_encrypt example program
2018-08-23 15:12:22 +01:00
Simon Butcher
48776350b2
Merge remote-tracking branch 'public/pr/1799' into mbedtls-2.1
2018-07-24 13:31:12 +01:00
Ron Eldor
c24108a8c8
Fix style issue
...
Add space before and after paranthesis.
2018-06-27 09:11:14 +03:00
Ron Eldor
45d23d62a1
Add check for return code of bignumber code
...
Add check for return code of `mbedtls_mpi_write_file`
as commented by @sbutcher-arm
2018-06-27 09:09:59 +03:00
Ron Eldor
eec77b5adf
remove additional zero byte when writing pub der
...
Remove `- 1` for setting location of output buffer,
which added a leading zero which cause failure in ASN1 parsing.
Fixes #1257
2018-06-26 17:38:44 +03:00
AndrzejKurek
0de430678e
pk_sign: fix overriding and ignoring return values
2018-04-03 19:38:45 +02:00
Martijn de Milliano
8f96fb2141
dh_server: Fixed expected number of bytes received from client when receiving public value.
2018-01-22 23:48:57 +01:00
Hanno Becker
b70ba9fec7
Address issues found by coverity
...
1) The MPI test for prime generation missed a return value
check for a call to `mbedtls_mpi_shift_r`. This is neither
critical nor new but should be fixed.
2) The RSA keygeneration example program contained code
initializing an RSA context after a potentially failing
call to CTR DRBG initialization, leaving the corresponding
RSA context free call in the cleanup section orphaned.
The commit fixes this by moving the initializtion of the
RSA context prior to the first potentially failing call.
2018-01-10 10:46:18 +00:00
Janos Follath
5ad678971d
Clarify the use of ECDSA API
...
In the ecdsa.c sample application we don't use hashing, we use ecdsa
directly on a buffer containing plain text. Although the text explains
that it should be the message hash it still can be confusing.
Any misunderstandings here are potentially very dangerous, because ECDSA
truncates the message hash if necessary and this can lead to trivial
signature forgeries if the API is misused and the message is passed
directly to the function without hashing.
This commit adds a hash computation step to the ecdsa.c sample
application and clarification to the doxygen documentation of the
ECDSA functions involved.
2017-06-07 15:59:21 +01:00
Ron Eldor
78011d9656
fix for issue 1101: missing rsa context initialization
...
added mbedtls_rsa_init in rsa_decrypt sample application
2017-03-01 16:05:25 +00:00
Simon Butcher
411fd7c23a
Add extra compilation conditions to gen_key.c #559
...
The sample application programs/pkey/gen_key.c uses the library function
mbedtls_pk_write_key_pem() which is dependent on the configuration option
MBEDTLS_PEM_WRITE_C. If the option isn't defined the build breaks.
This change adds the compilation condition MBEDTLS_PEM_WRITE_C to the gen_key.c
sample application.
2016-10-07 14:17:22 +01:00
Simon Butcher
c019035e8e
Add missing stdlib.h header to rsa sample programs
2016-05-18 19:36:03 +01:00
Simon Butcher
663638d202
Corrects platform return values in rsa sample programs
2016-05-18 19:36:03 +01:00
Simon Butcher
4529c48c42
Fixes error and exit paths in rsa sample programs
2016-05-18 19:36:03 +01:00
Janos Follath
bffa68d3ca
Fix memory leaks in example programs.
2016-05-18 19:36:03 +01:00
James Cowgill
6bfa1d826e
Fix minor spelling mistake in programs/pkey/gen_key.c
2015-10-27 10:27:51 +01:00
Manuel Pégourié-Gonnard
2ed05a049a
Fix typos
2015-09-09 11:52:28 +02:00
Manuel Pégourié-Gonnard
37ff14062e
Change main license to Apache 2.0
2015-09-04 14:21:07 +02:00
Manuel Pégourié-Gonnard
cf9ab63863
Fix error reporting in pkey/pk_* programs
2015-08-31 10:34:27 +02:00
Manuel Pégourié-Gonnard
ce7a08ba49
Fix more comments/outputs in verify programs
2015-08-31 10:34:27 +02:00
Manuel Pégourié-Gonnard
102a620c9a
Fix hash buffer size in pkey programs
2015-08-31 10:34:27 +02:00
Manuel Pégourié-Gonnard
d224ff1f63
Change default RSA key size in rsa_genkey
2015-08-31 10:34:27 +02:00
Manuel Pégourié-Gonnard
1d8f2da7df
Fix comments about filenames in some programs
2015-08-31 10:34:27 +02:00
Manuel Pégourié-Gonnard
d74c697035
Fix memory corruption in rsa sign/verify programs
...
We have no guarantee there is enough room in the argv strings.
Fixes #210
2015-08-31 10:34:27 +02:00
Manuel Pégourié-Gonnard
6fb8187279
Update date in copyright line
2015-07-28 17:11:58 +02:00
Manuel Pégourié-Gonnard
77c656217b
Update dh_genprime program
...
- default size 2048 bits
- make size a command-line argument
- remove warning about using own params
2015-07-03 16:57:52 +02:00
Manuel Pégourié-Gonnard
046589e424
Rm obsolete defines for snprintf in programs
...
Now centralized in the platform layer
2015-07-01 17:26:20 +02:00
Manuel Pégourié-Gonnard
3d7d00ad23
Rename mbedtls_net_close() to mbedtls_net_free()
...
close() may be more meaningful, but free() is symmetric with _init(), and more
consistent with all other modules
2015-06-30 16:50:37 +02:00
Manuel Pégourié-Gonnard
5db64328ab
Adapt programs to the new NET API
2015-06-30 16:48:17 +02:00
Manuel Pégourié-Gonnard
c0d749418b
Make 'port' a string in NET module
...
- avoids dependency on snprintf
- allows using "smtps" instead of "456" if desired
2015-06-23 13:09:11 +02:00
Manuel Pégourié-Gonnard
7580ba475d
Add a concept of entropy source strength.
...
The main goal is, we want and error if cycle counter is the only source.
2015-06-22 14:40:56 +02:00
Manuel Pégourié-Gonnard
c0696c216b
Rename mbedtls_mpi_msb to mbedtls_mpi_bitlen
2015-06-18 16:49:37 +02:00
Manuel Pégourié-Gonnard
3335205a21
Avoid in-out length in dhm_calc_secret()
2015-06-02 16:17:08 +01:00
Manuel Pégourié-Gonnard
06d5d61302
Adapt programs to generic md_file()
2015-05-28 17:28:38 +02:00
Manuel Pégourié-Gonnard
0b104b056b
Adapt prototype of net_accept() for explicit size
2015-05-14 21:58:34 +02:00
Manuel Pégourié-Gonnard
d9e6a3ac10
Rename pk_init_ctx() -> pk_setup()
2015-05-14 21:58:34 +02:00
Manuel Pégourié-Gonnard
ec160c0f53
Update ctr_drbg_init() usage in programs
2015-04-29 02:08:34 +02:00
Manuel Pégourié-Gonnard
b85725c958
Fix merge issue
2015-04-15 11:58:31 +02:00
Manuel Pégourié-Gonnard
862d503c01
Merge branch 'mbedtls-1.3' into development
...
* mbedtls-1.3:
Fix typos in Changelog
Fix macro name from wrong branch
Fix bug in pk_parse_key()
Fixed typos
Updated Travis CI config for mbedtls project
Conflicts:
include/mbedtls/ecp.h
include/polarssl/compat-1.2.h
include/polarssl/openssl.h
include/polarssl/platform.h
library/pkparse.c
programs/pkey/mpi_demo.c
2015-04-15 11:30:46 +02:00
Paul Bakker
6152b0267c
Fixed typos
2015-04-14 15:00:09 +02:00
Manuel Pégourié-Gonnard
2cf5a7c98e
The Great Renaming
...
A simple execution of tmp/invoke-rename.pl
2015-04-08 13:25:31 +02:00
Manuel Pégourié-Gonnard
932e3934bd
Fix typos & Co
2015-04-03 18:46:55 +02:00
Manuel Pégourié-Gonnard
32076e66be
Fix programs for recent ECDSA changes
2015-03-31 13:32:39 +02:00
Manuel Pégourié-Gonnard
7f8099773e
Rename include directory to mbedtls
2015-03-10 11:23:56 +00:00
Manuel Pégourié-Gonnard
998897be3d
Merge branch 'mbedtls-1.3' into development
...
* mbedtls-1.3:
Rename website and repository
Move private macro from header to C file
Add some missing 'static' on a few objects
Fix whitespace issues
Minor portability fix in benchmark
2015-03-06 13:25:41 +00:00