Requests.post() is giving Certificate verification failed error


#1

Dear colleagues,

I am using Julia v0.6
Calling Requests.post() for example:

using Requests

rsp = post(“https://test.com/post”; headers = Dict(“Authorization”=> “Basic udEB0YW5nZW50LndvcmtzOnRhbmdl==”),json = data)

I receive this error.


MbedTLS error code -9984: X509 - Certificate verification failed, e.g. CRL, CA or signature check failed.

I searched in Rqesuests.jl and found following function


function do_stream_request(uri::URI, verb; headers = Dict{AbstractString, AbstractString}(),
                            cookies = nothing,
                             .
                             .
                             .
                            history = Response[],
                            tls_conf = TLS_VERIFY 
                            write_body = true,
                            .
                            .
                            .
                            )

I also found that TLS_NOVERIFY is defined in streaming.jl. So I set the default value to

                        tls_conf = TLS_NOVERIFY 

After that. The Requests.post() is processed sucessfully.
I want to set tls_conf = TLS_NOVERIFY best would be at HTTP layer, through headers or so. I do not want to change Requests.jl file. Can anybody advise the way?

Kind Regards.