Jaeden Amero
b85e35d8d2
Merge remote-tracking branch 'upstream-public/pr/2102' into mbedtls-2.7
2018-12-07 16:15:46 +00:00
Hanno Becker
dc631fb87e
Add explicit integer to enumeration casts to programs/pkey/gen_key.c
...
Fixes #2170 .
2018-11-06 13:36:19 +00:00
Hanno Becker
3a3f1aa1a6
Add dependency of key_app_writer example program on PK parse module
2018-10-16 13:54:04 +01:00
Hanno Becker
063c50df8a
pk_encrypt: Uniformize debugging output
2018-08-23 15:57:15 +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
Simon Butcher
1bb41e5d04
Merge remote-tracking branch 'public/pr/1800' into mbedtls-2.7
2018-07-24 13:30:40 +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
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
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
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
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
Andres Amaya Garcia
7c55e79f54
Fix ret code in gen_key.c
2018-07-10 17:34:24 +01:00
Andres Amaya Garcia
47c041190c
Fix ret code in ecdsa.c
2018-07-10 17:34:23 +01:00
Andres Amaya Garcia
114ba1955e
Fix ret code in dh_server.c
2018-07-10 17:34:23 +01:00
Andres Amaya Garcia
74c51e6e64
Fix ret code in dh_genprime.c
2018-07-10 17:34:23 +01:00
Andres Amaya Garcia
f842345ac3
Fix ret code in dh_client.c
2018-07-10 17:34:23 +01:00
Ron Eldor
5146ef3811
Adjust to new RSA infrastructure
...
Don't access the rsa cotext parameters directly, but use
the local `mbedtls_mpi` variable that were exported.
2018-06-27 11:55:59 +03:00
Ron Eldor
0d63e6229d
Fix compilation errors after updating
...
Fix compilation errorsthat happened after new code introduced
by updating the branch. Replaced `exit` label with `cleanup`.
2018-06-27 08:49:00 +03:00
Ron Eldor
45486b135d
Fix style issue
...
Add space before and after paranthesis.
2018-06-26 19:11:12 +03:00
Ron Eldor
e1440898ca
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-26 19:11:05 +03:00
Ron Eldor
9aff65afa4
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:28:07 +03:00
Andrzej Kurek
ffaee0952c
pk_sign: added stdlib include
2018-04-03 04:36:52 -04:00
Andrzej Kurek
350e4dc6df
pk_sign: adjust return values
2018-04-03 04:04:36 -04:00
Andrzej Kurek
d959492797
pk_sign: fix overriding and ignoring return values
2018-03-26 04:13:24 -04:00
Jaeden Amero
005239e3ed
Merge remote-tracking branch 'upstream-public/pr/1294' into development
2018-01-25 14:47:39 +00:00
Gilles Peskine
cb1e5eb326
Merge branch 'pr_1000' into development-proposed
2018-01-23 00:57:34 +01:00
Gilles Peskine
550a2b036b
Merge branch 'pr_1163' into development-proposed
2018-01-23 00:57:26 +01:00
Gilles Peskine
9e4f77c606
New MD API: rename functions from _ext to _ret
...
The _ext suffix suggests "new arguments", but the new functions have
the same arguments. Use _ret instead, to convey that the difference is
that the new functions return a value.
2018-01-22 11:54:42 +01:00
Gilles Peskine
d91f2a26cb
Merge branch 'development' into iotssl-1251-2.7
...
Conflict resolution:
* ChangeLog: put the new entries in their rightful place.
* library/x509write_crt.c: the change in development was whitespace
only, so use the one from the iotssl-1251 feature branch.
2018-01-19 11:25:10 +01:00
Hanno Becker
d4d60579e4
Address issues found by coverity
...
1) `mbedtls_rsa_import_raw` used an uninitialized return
value when it was called without any input parameters.
While not sensible, this is allowed and should be a
succeeding no-op.
2) 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.
3) Both the RSA keygeneration example program and the
RSA test suites 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 of the respective function orphaned.
While this defect existed before, Coverity picked up on
it again because of newly introduced MPI's that were
also wrongly initialized only after the call to CTR DRBG
init. The commit fixes both the old and the new issue
by moving the initializtion of both the RSA context and
all MPI's prior to the first potentially failing call.
2018-01-10 07:30:47 +00:00
Chris Xue
9a51c032ee
Fix copy paste error in the error message of mbedtls_ecp_gen_key in gen_key.c
2017-11-05 19:10:51 +00:00
Hanno Becker
7f25f850ac
Adapt uses of mbedtls_rsa_complete
to removed PRNG argument
2017-10-10 16:56:22 +01:00
Hanno Becker
c6fc878eda
Remove mbedtls_rsa_check_crt
...
This is no longer needed after the decision to not exhaustively validate private key material.
2017-10-02 13:20:15 +01:00
Hanno Becker
f073de0c25
Adapt rsa_genkey example program to use new RSA interface
2017-08-23 16:17:28 +01:00
Hanno Becker
0c2639386e
Adapt rsa_encrypt example program to new RSA interface
2017-08-23 16:17:28 +01:00