godot/modules/mbedtls
Fabio Alessandrelli 60687ce778 Fix certificate generation with mbedtls 2.16.8 .
When generating certificates with
`Crypto.generate_self_signed_certificate` we generate the PEM in a
buffer via `mbedtls_x509write_crt_pem`.

Since version 2.16.8, mbedtls adds spurious data at the end of the
buffer due to internal optimizations, this breaks our logic when we try
to immediately parse it and return a proper `X509Certificate` object.

This commit updates the code to find the actual PEM length to parse
using `strlen`, takes extra caution always adding the terminator to the
buffer, and slightly improve error messages.
2020-09-15 18:47:51 +02:00
..
SCsub SCons: Format buildsystem files with psf/black 2020-03-30 09:05:53 +02:00
config.py SCons: Format buildsystem files with psf/black 2020-03-30 09:05:53 +02:00
crypto_mbedtls.cpp Fix certificate generation with mbedtls 2.16.8 . 2020-09-15 18:47:51 +02:00
crypto_mbedtls.h Implement RSA encryption/decryption. 2020-06-18 15:29:39 +02:00
dtls_server_mbedtls.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
dtls_server_mbedtls.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
packet_peer_mbed_dtls.cpp Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
packet_peer_mbed_dtls.h Changed default for p_validate_certs to true. 2020-03-17 02:18:57 +05:30
register_types.cpp Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
register_types.h Adding missing include guards to header files identified by LGTM. 2020-03-23 04:52:36 -04:00
ssl_context_mbedtls.cpp Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
ssl_context_mbedtls.h Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocks 2020-05-14 16:54:55 +02:00
stream_peer_mbedtls.cpp Style: Enforce braces around if blocks and loops 2020-05-14 21:57:34 +02:00
stream_peer_mbedtls.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00