Reputation: 929
I need to make a request to an internal web service, and need to provide a custom SSL certificate chain.
In python + requests, I would set the REQUESTS_CA_BUNDLE
environment variable to the path of the bundle, /etc/ssl/certs/ca-bundle.crt
. What is the equivalent with Julia's HTTP.jl? It doesn't seem to be picking up the bundle automatically.
Upvotes: 7
Views: 733
Reputation: 6474
According to the docs you can pass an sslconfig
object to the call. You can supply the certificate to this object:
Untested
using HTTP, MbedTLS
conf = MbedTLS.SSLConfig(cert_file, key_file)
resp = HTTP.get("https://httpbin.org/ip", sslconfig=conf)
println(resp)
Upvotes: 1
Reputation: 6086
HTTP.jl uses MbedTLS to process certificates, so I wonder if your Julia install somehow is missing that library. You might try installing MbedTLS directly for you platform and see where it looks for certificates by default.
Upvotes: 1