- iOS/Objective-C 元类和类别
- objective-c - -1001 错误,当 NSURLSession 通过 httpproxy 和/etc/hosts
- java - 使用网络类获取 url 地址
- ios - 推送通知中不播放声音
我在 CAcert 创建了一个 SSL 服务器证书.当我尝试通过 Java 程序(如下)从该服务器获取页面时,我得到了
Exception in thread "main" javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: CA key usage check failed: keyCertSign bit is not set
有人知道是什么原因造成的吗?
keytool -keystore/etc/ssl/certs/java/cacerts -list
中看到 cacert.org 证书。*.an.example.com
的通配符证书(已编辑真实域)。这是我用来测试的 Java 代码:
class Test {
public static void main(String args[]) throws Exception {
java.net.URL url = new java.net.URL(args[0]);
java.io.InputStream s = url.openStream();
}
}
full stack trace似乎没有添加任何有用的信息。
keytool(1)
联机帮助页确实提到了
Extensions can be marked critical to indicate that the extension should
be checked and enforced/used. For example, if a certificate has the
KeyUsage extension marked critical and set to "keyCertSign" then if this
certificate is presented during SSL communication, it should be rejected,
as the certificate extension indicates that the associated private key
should only be used for signing certificates and not for SSL use.
但我检查了证书,虽然“证书 key 使用”扩展确实显示“签名”,但它也被标记为“不重要”。
抱歉,我不想透露我的域名或证书,但如果需要,我可能可以启动服务器进行测试。
最佳答案
原来是证书本身的问题。 Folks at CAcert.org fixed it .耶!
关于java - 为什么 java 在 cacert.org : "keyCertSign bit is not set"? 上制作的证书上阻塞,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8179932/
我正在向 Java keystore 添加证书,但收到以下警告。命令成功。 keytool -import -trustcacerts -keystore /usr/lib/jvm/java-11-o
我如何确保我导入到 cacert 的证书 (myAppCertificate.crt) 已经存在于 cacert 文件中?有关信息,我正在使用 导入证书 keytool -import -alias
我是 Mercurial 的新手。我创建了一个 Bitbucket 帐户,创建了一个新的私有(private)存储库,然后尝试使用该存储库进行克隆。我收到此错误:中止:找不到 web.cacerts:
我正在与供应商的设备合作,他们使用默认的 Java cacert 来添加证书以允许自签名证书。在处理此过程时,我注意到 cacert 使用默认密码 changeit 为了提高安全性,我想更改 cace
我有一个从我的 CAS 服务器重定向到的 Web 应用程序。但我得到了这个异常(exception): javax.net.ssl.SSLHandshakeException: sun.securit
我已经在 CACert 注册为我的域 example.com 获取受信任的证书,当我想在 CACert 控制面板中添加域时,我必须选择用于该域的电子邮件地址: CACert 常见问题解答指出,目前除了
我的要求是将 Maven 存储库的证书导入全局 keystore 。 证书文件名为 maven-cacert.cer 。 我正在使用 C:\Program Files\Java\jdk1.6.0_20
我的程序中有一些代码设置套接字连接,然后写入远程服务器。 //Get Socket, set timeout, and initialize I/O streams S
我已将Java安装到Windows环境下的默认文件夹中。 但是,我没有管理员访问权限。如何将安全证书添加到 jre/lib/security 路径中的 cacerts 文件中?如果无法编辑此文件,我可
我现在使用devstack安装openstack,但不幸的是,我遇到了一个问题: /home/my/devstack/tools/create_userrc.sh -PA --target-dir /
我需要向 JRE 随附的 cacerts 添加受信任的证书,但我对客户的 JRE 安装没有控制权或所有权。除了假定 cacerts 文件的文件路径位置并将其读入自定义 TrustManager 之外,
我目前认为 cacert.pem 是一组 key ,我可以使用它们来检查我正在与之交谈的网站是否确实是它声称的网站。因此,如果我向某人发送依赖于 cacert.pem 的程序,我可以向他们发送我计算机
客户向我提供了一个用于服务调用的 HTTPS URL。我需要向该 URL 发出请求。我知道如果该 URL 的证书来自一个普通的提供者,那么它很可能已经在默认的 java truststore cace
我有 JAVA_HOME=C:\Users\myuser\jdk1.8.0_65 Eclipse 中的 JRE 系统库指向 C:\Users\myuser\jdk1.8.0_65 java -vers
在我的 Spring boot 应用程序中,我需要调用另一台服务器上的 API (GET: https://anotherserver.com/api)。服务器管理员给了我一个名为 cacerts(无
在我的 PayPal Pro 支付页面中,我使用带有以下选项的 cURL 函数 curl_setopt_array():cUIn CURLOPT_CAINFO => dirname(__FILE__)
我已经 root 了我的 Android (4.0.4) 手机并安装了一个应用程序来代理通过我的计算机的所有 HTTP 流量。这工作正常,我可以查看和修改所有 HTTP 请求。但是 HTTPS 流量不
我正在尝试通过 https 连接到使用非官方 CA 的网站。由于某种原因,它适用于 curl 但不适用于 python 请求。 请参阅下面的示例 Python 3.8.0 (default, Oct
我知道我可以使用 keytool -delete -alias alias -keystore .keystore 从证书存储中删除一些证书。但是我有 109 个证书存储在 cacerts 中:key
我正在使用 OpenJDK 8(从 https://jdk.java.net/java-se-ri/8 下载并解压,添加到 PATH),并且遇到了证书错误。 经过调查,我意识到 cacerts 存在问
我是一名优秀的程序员,十分优秀!