1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-11 21:41:47 +03:00
Commit Graph

1825 Commits

Author SHA1 Message Date
bce5f7882c Add missing platform macro defines in pk_decrypt.c 2018-06-14 23:01:55 +01:00
7d42965ea8 Fix typo in platform macro defines for examples 2018-06-14 23:01:55 +01:00
28abd8e98c Fix ret code in gen_random_havege.c 2018-06-14 23:01:55 +01:00
25b5af58b4 Fix ret code in rsa_encrypt.c 2018-06-14 23:01:55 +01:00
7fe4edf8c0 Fix ret code in rsa_decrypt.c 2018-06-14 23:01:55 +01:00
7a9d01ceed Fix ret code in cert_app.c 2018-06-14 23:01:55 +01:00
dabd78fdc3 Fix ret code in generic_sum.c 2018-06-14 23:01:55 +01:00
9f3379d3ca Fix ret code in pk_verify.c 2018-06-14 23:01:55 +01:00
82b2726b4c Fix ret code in pk_sign.c 2018-06-14 23:01:55 +01:00
0a7522c127 Fix ret code in pk_encrypt.c 2018-06-14 23:01:55 +01:00
52898179cf Fix ret code in pk_encrypt.c 2018-06-14 23:01:55 +01:00
f47c9c11d1 Fix ret code in ecdh_curve25519.c 2018-06-14 23:01:55 +01:00
d905db65b7 Fix ret code in mpi_demo.c 2018-06-14 23:01:55 +01:00
78dabe07bf Fix ret code in pem2der.c 2018-06-14 23:01:55 +01:00
357b0b283a Fix ret code in ssl_cert_test.c 2018-06-14 23:01:55 +01:00
80081a68cd Fix ret code in udp_proxy.c 2018-06-14 23:01:55 +01:00
57a0c9b62c Fix ret code in req_app.c 2018-06-14 23:01:55 +01:00
898b208929 Fix ret code in crl_app.c 2018-06-14 23:01:55 +01:00
f9a54d339f Fix ret code in cert_write.c 2018-06-14 23:01:55 +01:00
aacd928f97 Fix ret code in cert_req.c 2018-06-14 23:01:55 +01:00
67a42acfb8 Fix ret code in ssl_mail_client.c 2018-06-14 23:01:55 +01:00
4be53b5519 Fix ret code in ssl_fork_server.c 2018-06-14 23:01:10 +01:00
5517202541 Fix ret code in ssl_client1.c 2018-06-14 23:01:10 +01:00
73d4a5f131 Fix ret code in gen_random_ctr_drbg.c 2018-06-14 22:59:57 +01:00
55a0d56b33 Fix ret code in gen_entropy.c 2018-06-14 22:59:57 +01:00
a8332637d7 Fix ret code in rsa_verify_pss.c 2018-06-14 22:59:57 +01:00
0a860f6301 Fix ret code in rsa_verify.c 2018-06-14 22:59:57 +01:00
3c41e564f8 Fix ret code in rsa_sign_pss.c 2018-06-14 22:59:57 +01:00
1a66056c77 Fix ret code in rsa_sign.c 2018-06-14 22:59:57 +01:00
70e1ffdacd Fix ret code in rsa_genkey.c 2018-06-14 22:59:57 +01:00
ed68488e28 Fix ret code in key_app_writer.c 2018-06-14 22:59:57 +01:00
0faf1a5c01 Fix ret code in key_app.c 2018-06-14 22:59:57 +01:00
208c217dfa Fix ret code in gen_key.c 2018-06-14 22:59:57 +01:00
2602a1fbc5 Fix ret code in ecdsa.c 2018-06-14 22:59:57 +01:00
03a992c817 Fix ret code in dh_server.c 2018-06-14 22:59:57 +01:00
d6bfeff289 Fix ret code in dh_genprime.c 2018-06-14 22:59:57 +01:00
898841dc71 Fix ret code in dh_client.c 2018-06-14 22:59:57 +01:00
4c47df6f3f Fix ret code in crypt_and_hash.c 2018-06-14 22:59:57 +01:00
388c1b124e Fix ret code in aescrypt2.c 2018-06-14 22:59:57 +01:00
4481744538 Fix memory leak in ssl_server2 with SNI + async callback
In ssl_server2, the private key objects are normally local variables
of the main function. However this does not hold for private keys in
the SNI configuration. When async callbacks are used, the test code
transfers the ownership of the private keys to the async callbacks.
Therefore the test code must free the SNI private keys through the
async callbacks (but it must not free the straight private keys this
way since they are not even heap-allocated).
2018-06-14 13:26:52 +02:00
e247989061 SNI + SSL async callback: make all keys async
When testing async callbacks with SNI, make all the keys async, not
just the first one. Otherwise the test is fragile with respect to
whether a key is used directly or through the async callbacks.
2018-06-14 13:26:52 +02:00
2636fade52 ssl_async_resume: free the operation context on error 2018-06-14 13:26:52 +02:00
f5a9996088 ssl_server2: get op_name from context in ssl_async_resume as well 2018-06-14 13:26:52 +02:00
3dae1cfa3a Async callback: use mbedtls_pk_check_pair to compare keys
In the current test code, the object that is used as a public key in
the certificate also contains a private key. However this is because
of the way the stest code is built and does not demonstrate the API in
a useful way. Use mbedtls_pk_check_pair, which is not what real-world
code would do (since the private key would typically be in an external
cryptoprocessor) but is a more representative placeholder.
2018-06-14 13:26:51 +02:00
a668c60186 Rename mbedtls_ssl_async_{get,set}_data for clarity
Rename to mbedtls_ssl_get_async_operation_data and
mbedtls_ssl_set_async_operation_data so that they're about
"async operation data" and not about some not-obvious "data".
2018-06-14 13:26:51 +02:00
166ce748cf SSL async callback: cert is not always from mbedtls_ssl_conf_own_cert
The certificate passed to async callbacks may not be the one set by
mbedtls_ssl_conf_own_cert. For example, when using an SNI callback,
it's whatever the callback is using. Document this, and add a test
case (and code sample) with SNI.
2018-06-14 13:26:51 +02:00
d6fbfde994 ssl_async_set_key: detect if ctx->slots overflows 2018-06-14 13:26:51 +02:00
4d9ec4dcf7 Fix uninitialized variable in ssl_server2 2018-06-14 13:26:51 +02:00
6331d78675 Don't use the printf format %zd
We target C89 libc, so don't use %zd or %zu. Just use %u, and make
slot numbers `unsigned` for simplicity.
2018-06-14 13:26:51 +02:00
3f3ada8839 Fix memory leak in ssl_server2 with SNI + async callback
In ssl_server2, the private key objects are normally local variables
of the main function. However this does not hold for private keys in
the SNI configuration. When async callbacks are used, the test code
transfers the ownership of the private keys to the async callbacks.
Therefore the test code must free the SNI private keys through the
async callbacks (but it must not free the straight private keys this
way since they are not even heap-allocated).
2018-06-13 18:09:28 +02:00