When I use java to connect HTTPs, it got exception:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.
The reason is certificate is not recognized, so it's not accepted by java client.
So we need add this certificate to our local store.
JDK's default certificate store located at $JAVA_HOME/jre/lib/security/cacerts, the default password is 'changeit'. We can use following command to view it:
keytool -list -keystore$JAVA_HOME/jre/lib/security/cacerts
To import the certificate for the HTTPs, first use Browser (Firefox) view the page, and export the certificate to local disk. Then use following command import the certificate to JDK's store:
keytool -import -alias keyalias -keystore $JAVA_HOME/jre/lib/security/cacerts -file mycert.cer
分享到:
相关推荐
MariaDB的连接器,具体使用方法请见https://blog.csdn.net/qq_40922845/article/details/102762800
$ git clone https://github.com/darknautic/mongoConnect.git 配置路径 $ vim ~/mongoConnect/mongoConnect.sh mongoConnectPath packagePath 建立连结 $ sudo ln -s ~/mongoConnect/mongoConnect.sh /usr/...
通过Netty基于Java NIO的https代理服务器的实现。 这是一个简单的工作原理: 要通过浏览器对其进行测试,我们将需要设置一个虚拟主机名,如下所示: 127.0.0.1 test.localdomain 这样浏览器就能将SNI发送到我们...
Mastering Java for Data Science by Alexey Grigorev English | 4 May 2017 | ASIN: B01JLBMHMM | 364 Pages | AZW3 | 2.1 MB ...You can connect with Alexey on LinkedIn at https://de.linkedin.com/in/agrigorev.
TossPayments Connect Pay集成开发的Java示例代码。 由Spring Boot组成。 测试 $ git clone https://github.com/tosspayments/connectpay-java-sample.git $ cd conectpay-java-sample $ ./gradlew bootRun 服务器...
建立连接器要构建连接器,必须安装以下组件: Java 8或更高版本玛文GIT 使用以下命令克隆存储库: git clone https://github.com/johanvandevenne/kafka-connect-mqtt.git 将目录更改为kafka-connect-mqtt目录cd ...
Line 140076: 12-15 15:40:02.536 2593 3487 D JAVA_SOCKET: done super.connect(55011:80). sockthread=194 Line 140077: 12-15 15:40:02.536 2593 3487 D JAVA_SOCKET: Close(55011:80). sockthread=194
个人从网上搜索到的java网络...Document document=Jsoup.connect("https://www.baidu.com/").ignoreContentType(true).timeout(0).post(); //或者用get() document.html(); //获取整个页面 document.text(); //获取文本
support the install of cisco anyConnect.
' uncomment this if you want to connect to specific iHistorian server with a username and password 'strConnectionString$ = "Provider=ihOLEDB.iHistorian.1;Data Source=MYSERVER;User Id=user1;Password=...
下载 ngrok 参考网址 ...使用 cd D:\ngrok-stable-windows-amd64 d: ngrok.exe authtoken 3WeiJgYsiohmTTbZ8HB5L_4DoK3ThFJ69Wx5iS8UGJz ... 下载 web 开发者工具,找到 下载地址 ...3、网页服务--》网页帐号--》修改--》......
https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxba3445566677&redirect_uri=http://www.acc.com/weixin/pay/paydispatcher&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect ...
博文链接:https://tomshen.iteye.com/blog/192140
Beyond that deployable, there’s the very interesting world of DevOps that addresses how to deploy, manage, and cluster that microservice and connect it to the resources it needs to function....
Java浏览器插件为配置为Applets的Java程序提供了一种简便的方法来操作网页,并使网页可以通过LiveConnect API(https://www.oracle.com/)获取和设置Java字段并调用Java方法。 technetwork / java / javase / ...
Kafka Connect JDBC连接器 kafka-connect-jdbc是一个用于与任何兼容JDBC的数据库之间...常问问题在此处参考有关Kafka Connect JDBC的常见问题-https: 贡献源代码: : 问题追踪器: : 执照该项目已获得Apache 2许可。
最近纠结致死的一个java报错java.net.SocketException: Connection reset 终于得到解决
java版qq登录,原文地址:https://blog.csdn.net/m0_37865510/article/details/81099250
Kafka Connect HDFS连接器 kafka-connect-hdfs是一个用于在Kafka和Hadoop HDFS之间复制...在此处参考有关Kafka Connect HDFS的常见问题-https: 贡献 源代码: : 问题追踪器: : 执照 该项目已获得Apache 2许可。
FUI StoreConnect Sensor API的服务器注入器 简单的实用工具,可将数据注入 要求 安装了 。 ...$ java -jar storeconnect-sensors-api-server-injector.jar \ --enpoint <FUI STORECONNECT SE