【发布时间】:2020-05-06 16:47:14
【问题描述】:
这是我的 curl 请求
`curl --insecure --location --request POST 'url' --header 'Content-Type: application/json' --data-raw '{
"client_id": "test"
}'
效果很好!
现在这是我的灵药要求
HTTPoison.post("url", request, ssl: [verify: :verify_none])
这里出现错误
{:error,
%HTTPoison.Error{
id: nil,
reason: {:tls_alert,
{:handshake_failure,
'TLS client: In state certify at ssl_handshake.erl:1783 generated CLIENT ALERT: Fatal - Handshake Failure\n {bad_cert,unable_to_match_altnames}'}}
}}
`
【问题讨论】:
-
@sbacaro 谢谢!使用这个我也面临同样的错误
-
强制 tls v1.2 比告诉 hackney 操作不安全要好