mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-01-27 06:35:22 +00:00
a97f1ac5f9
When USE_PSA_INIT() failed because lack of seedfile, mbedtls_x509write_csr_free() crashed when called on an unitialized mbedtls_x509write_csr struct. This moves mbedtls_x509write_csr_init before calling USE_PSA_INIT(), which could probably fail, and uses the same flow in x509_csr_check() and x509_csr_check_opaque(). Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>