Clojure SSL指定要用作客户端证书的本地证书
这来自python“请求”http库的python文档 “您还可以指定一个本地证书用作客户端证书、单个文件(包含私钥和证书)或两个文件路径的元组:”Clojure SSL指定要用作客户端证书的本地证书,ssl,clojure,Ssl,Clojure,这来自python“请求”http库的python文档 “您还可以指定一个本地证书用作客户端证书、单个文件(包含私钥和证书)或两个文件路径的元组:” >>请求。获取('https://kennethreitz.com,cert=('/path/server.crt','/path/key')) 在Clojure做同样事情的好方法是什么?我查看了CLJHTTP和http工具包,但没有看到示例,您看到了吗 它有特定的证书处理测试。最重要的是名称空间 根据该测试,加载密钥库和证书的典型示例如下:
>>请求。获取('https://kennethreitz.com,cert=('/path/server.crt','/path/key'))
在Clojure做同样事情的好方法是什么?我查看了CLJHTTP和http工具包,但没有看到示例,您看到了吗
它有特定的证书处理测试。最重要的是名称空间
根据该测试,加载密钥库和证书的典型示例如下:
(def ks-file "test-resources/keystore.jks")
(def cert-file "test-resources/certificate.crt")
(def password "secret")
(defn load-test-certificate [] (load-x509-cert cert-file))
(defn load-test-keystore [] (load-keystore (resource-stream ks-file) password))
(def ks-file "test-resources/keystore.jks")
(def cert-file "test-resources/certificate.crt")
(def password "secret")
(defn load-test-certificate [] (load-x509-cert cert-file))
(defn load-test-keystore [] (load-keystore (resource-stream ks-file) password))