Browse Source

Fix AutoUpdate test, only disable SSL in test

master
Macoy Madson 5 months ago
parent
commit
fffec0c981
  1. 10
      src/AutoUpdate.cake
  2. 2
      src/Curl.cake

10
src/AutoUpdate.cake

@ -217,13 +217,19 @@
(curl_global_cleanup)
(return 1))
;; For testing only! Disable SSL certificate validation
(curl_easy_setopt curl CURLOPT_SSL_VERIFYPEER 0)
(curl_easy_setopt curl CURLOPT_SSL_VERIFYHOST 0)
(var new-version int 0)
(unless (auto-update-download curl macoy-public-key update-cakedata-url current-version
output-directory new-file-to-use (sizeof new-file-to-use))
output-directory new-file-to-use (sizeof new-file-to-use)
(addr new-version))
(curl_easy_cleanup curl)
(curl_global_cleanup)
(return 1))
(fprintf stderr "The update says I should use %s\n" new-file-to-use)
(fprintf stderr "The update says I should use %s for version %d\n" new-file-to-use new-version)
(curl_easy_cleanup curl)
(curl_global_cleanup)

2
src/Curl.cake

@ -253,8 +253,6 @@
(curl_easy_setopt curl CURLOPT_URL url)
(curl_easy_setopt curl CURLOPT_WRITEFUNCTION curl-receive-data-into-dynarray)
(curl_easy_setopt curl CURLOPT_WRITEDATA dynarray-out)
(curl_easy_setopt curl CURLOPT_SSL_VERIFYPEER 0) ;; TODO TODO TODO REMOVE!
(curl_easy_setopt curl CURLOPT_SSL_VERIFYHOST 0) ;; TODO TODO TODO REMOVE!
(var result CURLcode (curl_easy_perform curl))
(unless (= CURLE_OK result)
(fprintf stderr "warning: failed to get url %s with result %s\n"

Loading…
Cancel
Save