mbedtls/library
Hanno Becker 99f3916e31 Return from debugging functions if SSL context is unset
The debugging functions
- mbedtls_debug_print_ret,
- mbedtls_debug_print_buf,
- mbedtls_debug_print_mpi, and
- mbedtls_debug_print_crt
return immediately if the SSL configuration bound to the
passed SSL context is NULL, has no debugging functions
configured, or if the debug threshold is below the debugging
level.
However, they do not check whether the provided SSL context
is not NULL before accessing the SSL configuration bound to it,
therefore leading to a segmentation fault if it is.
In contrast, the debugging function
- mbedtls_debug_print_msg
does check for ssl != NULL before accessing ssl->conf.

This commit unifies the checks by always returning immediately
if ssl == NULL.
2018-08-23 14:57:39 +01:00
..
.gitignore
aes.c Add missing MBEDTLS_DEPRECATED_REMOVED guards 2018-02-21 19:16:20 +01:00
aesni.c
arc4.c
asn1parse.c
asn1write.c Merge remote-tracking branch 'public/pr/1655' into mbedtls-2.7 2018-06-12 17:40:08 +01:00
base64.c
bignum.c Minor fixes 2018-03-09 10:48:12 +00:00
blowfish.c
camellia.c
ccm.c enforce input and output of ccm selftest on stack 2018-07-30 11:43:08 +03:00
certs.c
cipher_wrap.c
cipher.c Move definition of MBEDTLS_CIPHER_MODE_STREAM 2018-06-28 08:44:47 +03:00
cmac.c Merge remote-tracking branch 'public/pr/1390' into mbedtls-2.7 2018-06-27 11:11:34 +01:00
CMakeLists.txt Update version to 2.7.5 2018-07-25 15:43:21 +01:00
ctr_drbg.c ctr_drbg: Typo fix in the file description comment. 2018-02-10 11:11:41 +02:00
debug.c Return from debugging functions if SSL context is unset 2018-08-23 14:57:39 +01:00
des.c
dhm.c Merge remote-tracking branch 'upstream-restricted/pr/410' into development-restricted 2018-01-26 18:43:04 +00:00
ecdh.c
ecdsa.c Clarify the use of MBEDTLS_ERR_PK_SIG_LEN_MISMATCH 2018-03-30 18:43:16 +02:00
ecjpake.c Fix multiple quality issues in the source 2018-06-08 11:14:43 +01:00
ecp_curves.c
ecp.c Fix memory leak in ecp_mul_comb() if ecp_precompute_comb() fails 2018-07-26 11:08:06 +03:00
entropy_poll.c
entropy.c Merge branch 'development' into development-restricted 2018-01-25 17:28:31 +00:00
error.c Update error.c 2018-03-30 18:52:10 +02:00
gcm.c
havege.c
hmac_drbg.c
Makefile Merge remote-tracking branch 'upstream-public/pr/1500' into mbedtls-2.7-proposed 2018-04-01 12:41:29 +02:00
md2.c MD: Make deprecated functions not inline 2018-02-22 08:20:42 +00:00
md4.c MD: Make deprecated functions not inline 2018-02-22 08:20:42 +00:00
md5.c Fix Lucky 13 cache attack on MD/SHA padding 2018-07-12 10:18:37 +02:00
md_wrap.c New MD API: rename functions from _ext to _ret 2018-01-22 11:54:42 +01:00
md.c Merge branch 'development' into development-restricted 2018-01-25 17:28:31 +00:00
memory_buffer_alloc.c Fix braces in mbedtls_memory_buffer_alloc_status() 2018-05-23 16:32:33 +01:00
net_sockets.c Merge remote-tracking branch 'public/pr/1711' into mbedtls-2.7 2018-06-14 11:01:14 +01:00
oid.c pkcs5v2: add support for additional hmacSHA algorithms 2018-02-08 17:18:15 +08:00
padlock.c
pem.c Merge remote-tracking branch 'upstream-public/pr/778' into mbedtls-2.7-proposed 2018-03-12 23:44:56 +01:00
pk_wrap.c Clarify the use of MBEDTLS_ERR_PK_SIG_LEN_MISMATCH 2018-03-30 18:43:16 +02:00
pk.c
pkcs5.c Treat warnings as errors for IAR 2018-05-25 14:58:33 +01:00
pkcs11.c
pkcs12.c
pkparse.c Remove unnecessary mark as unused #1098 (backport) 2018-07-20 14:08:02 +02:00
pkwrite.c
platform.c Merge remote-tracking branch 'upstream-public/pr/1079' into mbedtls-2.7-proposed 2018-03-11 00:48:17 +01:00
ripemd160.c MD: Make deprecated functions not inline 2018-02-22 08:20:42 +00:00
rsa_internal.c
rsa.c Merge tag 'mbedtls-2.7.2' into iotssl-1381-x509-verify-refactor-2.7-restricted 2018-03-23 02:12:44 +01:00
sha1.c Fix Lucky 13 cache attack on MD/SHA padding 2018-07-12 10:18:37 +02:00
sha256.c Fix Lucky 13 cache attack on MD/SHA padding 2018-07-12 10:18:37 +02:00
sha512.c Fix Lucky 13 cache attack on MD/SHA padding 2018-07-12 10:18:37 +02:00
ssl_cache.c
ssl_ciphersuites.c Add ecc extensions only if ecc ciphersuite is used 2018-06-28 15:49:34 +03:00
ssl_cli.c Merge remote-tracking branch 'upstream-public/pr/1814' into mbedtls-2.7 2018-08-10 11:01:29 +01:00
ssl_cookie.c
ssl_srv.c Merge remote-tracking branch 'upstream-public/pr/1814' into mbedtls-2.7 2018-08-10 11:01:29 +01:00
ssl_ticket.c
ssl_tls.c Reset session_in/out pointers in ssl_session_reset_int() 2018-08-14 15:48:36 +01:00
threading.c Do not define and initialize global mutexes on configurations that do not use them. 2018-03-21 15:13:08 +00:00
timing.c Fix alarm(0) failure on mingw32 2018-01-29 10:24:50 +01:00
version_features.c Merge branch 'prr_424' into mbedtls-2.7-proposed 2018-02-22 16:07:32 +01:00
version.c
x509_create.c
x509_crl.c x509: CRL: reject unsupported critical extensions 2018-03-14 09:24:12 +01:00
x509_crt.c Merge tag 'mbedtls-2.7.2' into iotssl-1381-x509-verify-refactor-2.7-restricted 2018-03-23 02:12:44 +01:00
x509_csr.c Coding style 2018-06-22 11:45:38 +01:00
x509.c x509.c: Remove unused includes 2018-07-02 12:13:26 +01:00
x509write_crt.c New MD API: rename functions from _ext to _ret 2018-01-22 11:54:42 +01:00
x509write_csr.c
xtea.c