Pair inits with declarations

Signed-off-by: Paul Elliott <paul.elliott@arm.com>
This commit is contained in:
Paul Elliott
2024-10-25 12:41:28 +01:00
parent 9488b8c513
commit 417b8d92a1

View File

@@ -207,19 +207,21 @@ void x509_csr_check_opaque(char *key_file, int md_type, int key_usage,
int cert_type)
{
mbedtls_pk_context key;
mbedtls_pk_init(&key);
mbedtls_svc_key_id_t key_id = MBEDTLS_SVC_KEY_ID_INIT;
psa_algorithm_t md_alg_psa;
mbedtls_x509write_csr req;
mbedtls_x509write_csr_init(&req);
unsigned char buf[4096];
int ret;
size_t pem_len = 0;
const char *subject_name = "C=NL,O=PolarSSL,CN=PolarSSL Server 1";
mbedtls_test_rnd_pseudo_info rnd_info;
memset(&rnd_info, 0x2a, sizeof(mbedtls_test_rnd_pseudo_info));
mbedtls_x509write_csr_init(&req);
mbedtls_pk_init(&key);
USE_PSA_INIT();