From 883ce2edb5a4447ebe193e3ec469605303d5ddef Mon Sep 17 00:00:00 2001 From: neru Date: Tue, 12 May 2026 19:13:34 -0300 Subject: [PATCH] fix: init order --- src/proxy/tinymitm/proxy.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/proxy/tinymitm/proxy.cpp b/src/proxy/tinymitm/proxy.cpp index a89a015..99759b3 100644 --- a/src/proxy/tinymitm/proxy.cpp +++ b/src/proxy/tinymitm/proxy.cpp @@ -119,16 +119,16 @@ bool TinyMITMProxy::init() { _running = true; - if (!_certManager.init()) return false; - // wolfssl setup - wolfSSL_Init(); + if (wolfSSL_Init() != WOLFSSL_SUCCESS) return false; _clientCtx = wolfSSL_CTX_new(wolfTLSv1_3_client_method()); if (!_clientCtx) return false; wolfSSL_CTX_set_verify(_clientCtx, WOLFSSL_VERIFY_NONE, nullptr); + // cert setup + if (!_certManager.init()) return false; bool hasCA = false; if (_config.autoGenerateCA) {