Java可以连接通配符ssl吗
我们希望购买通配符 SSL 证书,因为我们有很多子域。但是我不知道Java是否信任通配符证书。当人们通过 SSL 连接到我们的 API 时,我们不足以强制与我们通信的所有第三方将我们的 SSL 证书添加到他们的本地信任库中。
目前,我面临着两难的境地:从 java 受信任的颁发者那里购买通配符证书,还是每个子域购买多个证书。
其他语言也有信任库吗?如果是这样,有人知道通配符证书是否也适用于它们。
We wish to buy a wild-card SSL certificate as we have a lot of sub-domains. However I don't know if Java trusts wild-card certificates. As people connect into our API via SSL it will not be sufficient for us to force all third parties we communicate with to add our SSL certificate into their local truststore.
At the moment I'm facing a dilemma to buy a wildcard certificate from a java trusted issuer or buy multiple certs one per sub-domain.
Do other languages also have a truststore? If so does anyone know if wildcard certificates work with them also.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Sun JSSE 中的默认实现不支持通配符。您需要编写自己的 X509TrustManager 来处理通配符。
但是,Java 从 Java 5 开始支持 SAN(主题备用名称)。如果您的名称少于 20 个,您可以获得所有这些名称的一张证书。它可能比通配符证书便宜。
The default implementation in Sun's JSSE doesn't support wildcard. You need to write your own X509TrustManager to handle wildcard.
However, Java supports SAN (Subject Alternative Names) since Java 5. If you have less than 20 names, you can get one certificate for all of them. It may be cheaper than a wildcard cert.
我已经尝试使用 java 6 进行此操作。
它似乎工作正常。我已成功从具有通配符 SSL 证书的文件中读取标头和正文内容。
编辑 我刚刚收到确认,这适用于 java 1.5
I've attempted this with java 6.
It appears to work correctly. I've succesfully read headers and body content from a file that had a wildcard SSL certificate.
EDIT I've just recieved confirmation that this works on java 1.5