summaryrefslogtreecommitdiff
path: root/servers/rendering/rendering_server_scene.h
diff options
context:
space:
mode:
authorFabio Alessandrelli <fabio.alessandrelli@gmail.com>2020-09-15 18:47:51 +0200
committerFabio Alessandrelli <fabio.alessandrelli@gmail.com>2020-09-15 18:47:51 +0200
commit60687ce778edcda007039541dd06034bc671b6e4 (patch)
tree332e9d59790344e276b985be0cef99c02f2140d6 /servers/rendering/rendering_server_scene.h
parent7f0352b4d10f87b50b732d120449349041501d03 (diff)
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.
Diffstat (limited to 'servers/rendering/rendering_server_scene.h')
0 files changed, 0 insertions, 0 deletions