Closed thiagokokada closed 3 years ago
BTW, I am using the following code to check for SSL feature in curl
:
(defn- check-ssl-support!*
[]
(as-> (shell/sh "curl" "--version") $
(:out $)
(re-seq #"(?m)^Features:.*(?:SSL).*" $)
(assert $
(str "You won't be able to use curl without SSL support!\n"
"Please install a curl version with SSL (for example, with \"brew install curl-openssl\")."))))
(defn check-ssl-support! (memoize check-ssl-support!*))
After trying several checks, I decided to just go with some documentation. People can just upgrade their curl installation or use the :compress false
option. I don't want to incur any overhead on the first request.
Https on windows 10 only works for me by adding :raw-args ["--ssl-no-revoke"]
example:
(curl/get "https://google.com" {:compressed false :raw-args ["--ssl-no-revoke"]})
This is probably only necessary because I am not able to update curl. It always uses the default version although the powershell alias is already gone.
Without the parameter I get:
clojure.lang.ExceptionInfo: curl: (35) schannel: next InitializeSecurityContext failed: Unknown error (0x80092012)
update: Its due to antivirus/firewall. Curl works without --ssl-no-revoke
, when I disable Kaspersky internet security or disable scanning encrypted connections.
Hopefully this helps someone else :-)
@sejoharp Thanks for the report. Perhaps you can teach the virus-scanner to play well with curl. Babashka uses the curl which is on the PATH (see (System/getenv "PATH"))
, so you might be able to influence that.
Using
babashka
v.0.4.1
on Windows, I tried to run the following in the REPL:Doing this instead it works:
We probably need to check for features. Using
curl --version
on Windows I got:On my NixOS system:
According to this bug report, we need to check for either
libz
orbrotli
feature.