【发布时间】:2010-09-09 09:36:44
【问题描述】:
我正在使用 clojure-http 进行以下 POST:
(clojure-http.resourcefully/post "https://android.apis.google.com/c2dm/send"
{"Authorization" (str "GoogleLogin auth=" auth-token)}
{"registration_id" registration-id
"data.msg" "blah"
"collapse_key" "blah"})
得到这个异常:
java.security.cert.CertificateException: No subject alternative DNS name matching android.apis.google.com found.
[Thrown class javax.net.ssl.SSLHandshakeException]
由于某种奇怪的原因,大约 10% 的时间我没有得到异常并且请求通过。
我认为这是 Java 的主机名检查 SSL 连接的问题*,所以我的问题是,如何从 Clojure 禁用它? (或者在安全方面这是一个坏主意?)
谢谢, 魏
*从这篇文章和其他类似的帖子中推断出来:http://www.jroller.com/hasant/entry/no_subject_alternative_names_matching
【问题讨论】:
标签: java http ssl https clojure