diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2020-09-15 18:47:51 +0200 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2020-09-15 18:47:51 +0200 |
commit | 60687ce778edcda007039541dd06034bc671b6e4 (patch) | |
tree | 332e9d59790344e276b985be0cef99c02f2140d6 /editor/icons/CanvasLayer.svg | |
parent | 7f0352b4d10f87b50b732d120449349041501d03 (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 'editor/icons/CanvasLayer.svg')
0 files changed, 0 insertions, 0 deletions