From 920af1a6643af4f5f6ea58bead2bcc19c527f517 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 23 Jan 2020 20:05:22 +0100 Subject: [PATCH] wolfssh: make it init properly via Curl_ssh_init() Closes #4846 --- lib/easy.c | 7 ------- lib/vssh/wolfssh.c | 5 +++++ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/easy.c b/lib/easy.c index 9211bc219..d1b60861f 100644 --- a/lib/easy.c +++ b/lib/easy.c @@ -193,13 +193,6 @@ static CURLcode global_init(long flags, bool memoryfuncs) } #endif -#ifdef USE_WOLFSSH - if(WS_SUCCESS != wolfSSH_Init()) { - DEBUGF(fprintf(stderr, "Error: wolfSSH_Init failed\n")); - return CURLE_FAILED_INIT; - } -#endif - if(flags & CURL_GLOBAL_ACK_EINTR) Curl_ack_eintr = 1; diff --git a/lib/vssh/wolfssh.c b/lib/vssh/wolfssh.c index f9c43de70..363a52c77 100644 --- a/lib/vssh/wolfssh.c +++ b/lib/vssh/wolfssh.c @@ -1142,6 +1142,11 @@ size_t Curl_ssh_version(char *buffer, size_t buflen) CURLcode Curl_ssh_init(void) { + if(WS_SUCCESS != wolfSSH_Init()) { + DEBUGF(fprintf(stderr, "Error: wolfSSH_Init failed\n")); + return CURLE_FAILED_INIT; + } + return CURLE_OK; } void Curl_ssh_cleanup(void)