From b10e4b00fa4300ec0f1ddeed91c6c3d5fe51cc48 Mon Sep 17 00:00:00 2001 From: Eugene K Date: Tue, 12 Sep 2023 11:13:50 -0400 Subject: [PATCH] fix crash with mbedtls on CSR generation --- library/ziti.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/ziti.c b/library/ziti.c index 76784c9d..f72ecdd4 100644 --- a/library/ziti.c +++ b/library/ziti.c @@ -1450,7 +1450,9 @@ static void session_post_auth_query_cb(ziti_context ztx, int status, void *ctx) ztx->id, uv_now(ztx->loop)); ztx->tlsCtx->generate_key(&ztx->sessionKey); - ztx->tlsCtx->generate_csr_to_pem(ztx->sessionKey, &ztx->sessionCsr, NULL, + + size_t csr_len; + ztx->tlsCtx->generate_csr_to_pem(ztx->sessionKey, &ztx->sessionCsr, &csr_len, "O", "OpenZiti", "OU", "ziti-sdk", "CN", common_name,