]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
change verify into init method
authorBastian Dehn <hhaalo@arcor.de>
Wed, 15 Oct 2025 06:42:37 +0000 (08:42 +0200)
committerBastian Dehn <hhaalo@arcor.de>
Wed, 15 Oct 2025 06:42:37 +0000 (08:42 +0200)
src/kds_s2000w_client.c

index b7902cd411d6bd22066e7f8a86d408ab54d4a885..d4ce51318a98b5f975037f59777b037650d385bc 100644 (file)
@@ -134,6 +134,7 @@ char* _kds_s2000w_client_errbuf_init()
        param->errbuf = _kds_s2000w_client_errbuf_init();
 
        _kds_s2000w_client_set_verbose(param->curl);
+       _kds_s2000w_client_set_ssl_verification_off(param->curl);
 
        return param;
  }
@@ -250,8 +251,6 @@ uint8_t kds_s2000w_client_open_session(response* resp)
 
        curl_easy_setopt(param->curl, CURLOPT_POST, 1L);
        curl_easy_setopt(param->curl, CURLOPT_POSTFIELDS, body);
-       _kds_s2000w_client_set_ssl_verification_off(param->curl);
-
        curl_easy_setopt(param->curl, CURLOPT_ERRORBUFFER, param->errbuf);
        curl_easy_setopt(param->curl, CURLOPT_WRITEFUNCTION, _kds_s2000w_client_write_callback);
        curl_easy_setopt(param->curl, CURLOPT_WRITEDATA, resp);