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
config.py
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
dtls_server_mbedtls.h
packet_peer_mbed_dtls.cpp
packet_peer_mbed_dtls.h
register_types.cpp
register_types.h
ssl_context_mbedtls.cpp
ssl_context_mbedtls.h
stream_peer_mbedtls.cpp
stream_peer_mbedtls.h