mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-04-10 06:44:28 +00:00
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>