开发者

X509Certificate Java Class equivalent in Ruby?

within Java, to gather the user's certs, you could achieve this by:

X509Certificate[] certs = (X509Certificate[]) request.getAttribute("javax.servlet.request.X509Certificate");

From there, you could check the validity using the checkValidity method for each particular cert in the array. In Rails/Ruby, is there a similar way to gather the user's certs?

Similarly, you could establish your trust and key stores via

System.setProperty("javax.net.ssl.keyStore", "/path/to/keystore");
System.setProperty("javax.net.ssl.trustStore", "/path/to/truststore");

Where in Rails can I establi开发者_Python百科sh the key/trust stores or is completely dependent on the server?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜