godot/modules/mbedtls
Fabio Alessandrelli f1b2a7d1b4
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.

(cherry picked from commit 60687ce778)
2020-09-15 19:27:48 +02:00
..
config.py SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
crypto_mbedtls.cpp Fix certificate generation with mbedtls 2.16.8 . 2020-09-15 19:27:48 +02:00
crypto_mbedtls.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00
dtls_server_mbedtls.cpp New PacketPeerDTLS and DTLSServer classes. 2020-02-25 11:35:47 +01:00
dtls_server_mbedtls.h New PacketPeerDTLS and DTLSServer classes. 2020-02-25 11:35:47 +01:00
packet_peer_mbed_dtls.cpp New PacketPeerDTLS and DTLSServer classes. 2020-02-25 11:35:47 +01:00
packet_peer_mbed_dtls.h Changed default for p_validate_certs to true. 2020-05-05 13:41:40 +02:00
register_types.cpp New PacketPeerDTLS and DTLSServer classes. 2020-02-25 11:35:47 +01:00
register_types.h Adding missing include guards to header files identified by LGTM. 2020-03-25 11:38:54 +01:00
SCsub SCons: Format buildsystem files with psf/black 2020-06-10 15:30:52 +02:00
ssl_context_mbedtls.cpp New PacketPeerDTLS and DTLSServer classes. 2020-02-25 11:35:47 +01:00
ssl_context_mbedtls.h New PacketPeerDTLS and DTLSServer classes. 2020-02-25 11:35:47 +01:00
stream_peer_mbedtls.cpp Move mbedlts print func to SSLMbedTLSContext. 2020-02-25 11:35:47 +01:00
stream_peer_mbedtls.h Update copyright statements to 2020 2020-01-01 11:16:22 +01:00