X509Certificate Java 类在 Ruby 中等效吗?
在 Java 中,要收集用户的证书,您可以通过以下方式实现:
X509Certificate[] certs = (X509Certificate[]) request.getAttribute("javax.servlet.request.X509Certificate");
从那里,您可以使用 checkValidity 方法检查数组中每个特定证书的有效性。在 Rails/Ruby 中,是否有类似的方法来收集用户的证书?
同样,您可以通过
System.setProperty("javax.net.ssl.keyStore", "/path/to/keystore");
System.setProperty("javax.net.ssl.trustStore", "/path/to/truststore");
Where in Rails can I build the key/truststores 来建立您的信任和密钥存储,或者完全依赖于服务器?
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 establish the key/trust stores or is completely dependent on the server?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论