类似 java -Djavax.net.debug=SSL,handshake,data,trustmanager MyApp 如何在Eclipse下运行
2016-08-26 14:11
495 查看
(http://blog.csdn.net/dgenerationx/article/details/3963356)
(http://bbs.csdn.net/topics/390132577)
如何在Eclipse执行 类似 JSSE 提供的 动态 debug 追踪模式
列:
java -Djavax.net.debug=SSL,handshake,data,trustmanager
首先确定这是一个属于运行时 VM 的一个参数, 且该参数是 -Djavax.net.debug=SSL,handshake,data,trustmanager, 所以接下来我们就需要将该参数加入到VM的Parameters里面去
click "Run" on the top menus
select "Run Configuration"
Switch to the "Arguments" tab on the right panel
Click "Certificates" under the panle "VM parameters"
Click "NEW"
Enter name as "java.net.debug", then enter the value "-Djavax.net.debug=SSL,handshake,data,trustmanager"
Added the "java.net.debug" parameter into "VM parameters"
============================================================================
实际上就是通过 KeyStoreManager, TrustManager 创建 SSLContext 对象,再通过 SSLContext 对象创建 SSLSocketFactory 对象,并将 SSLSocketFactory 对象赋给 HttpsURLConnection 对象。
KeyStoreManager 管理着双向认证中的客户端证书库
TrustManager 管理着双向认证中服务端证书信任库,相当于浏览器中我知道该证书非 CA 签发,但我需要继续操作。
(http://bbs.csdn.net/topics/390132577)
如何在Eclipse执行 类似 JSSE 提供的 动态 debug 追踪模式
列:
java -Djavax.net.debug=SSL,handshake,data,trustmanager
首先确定这是一个属于运行时 VM 的一个参数, 且该参数是 -Djavax.net.debug=SSL,handshake,data,trustmanager, 所以接下来我们就需要将该参数加入到VM的Parameters里面去
click "Run" on the top menus
select "Run Configuration"
Switch to the "Arguments" tab on the right panel
Click "Certificates" under the panle "VM parameters"
Click "NEW"
Enter name as "java.net.debug", then enter the value "-Djavax.net.debug=SSL,handshake,data,trustmanager"
Added the "java.net.debug" parameter into "VM parameters"
============================================================================
实际上就是通过 KeyStoreManager, TrustManager 创建 SSLContext 对象,再通过 SSLContext 对象创建 SSLSocketFactory 对象,并将 SSLSocketFactory 对象赋给 HttpsURLConnection 对象。
KeyStoreManager 管理着双向认证中的客户端证书库
TrustManager 管理着双向认证中服务端证书信任库,相当于浏览器中我知道该证书非 CA 签发,但我需要继续操作。
相关文章推荐
- 类似 java -Djavax.net.debug=SSL,handshake,data,trustmanager MyApp 如何在Eclipse下运行
- andorid HTTPS 不需要证书 VolleyEror: com.android.volley.NoConnectionError: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not fou
- 如何用eclipse打开并运行一个已经写好的java文件?
- Eclipse运行时提示failed to create the java virtual machine 如何解决
- java学习之旅15、16--eclipse开发环境的使用_建立java项目_运行java项目,eclipse运行程序的问题(src和bin问题)_debug模式
- 如何在Mac系统安装eclipse并运行java程序?
- Eclipse开发JAVA中如何Debug
- Eclipse运行时提示failed to create the java virtual machine 如何解决
- eclipse打包jar发布到linux下运行出错(java.lang.ClassNotFoundException: cmd.WordCount$MyMapper )
- 在JDK和Eclipse下如何编写和运行Java Applet
- 【Java】【FAQ】Eclipse4.4.1+JDK1.7在Debug运行模式下,ERROR: JDWP Unable to get JNI 1.2 environment, jvm->GetEnv
- Linux下tomcat配置ssl中报错问题的解决javax.net.ssl.SSLHandshakeException: java.security.cert.CertificateExcepti
- Eclipse开发JAVA中如何Debug
- Eclipse运行时提示failed to create the java virtual machine 如何解决
- Eclipse运行时提示failed to create the java virtual machine 如何解决
- Eclipse如何运行java程序
- 如何在eclipse上运行和debug ns3
- 怎么用bat文件运行eclipse建立的项目,如何将写好的java项目生成可执行的bat文件
- 用jetty插件运行maven项目 在eclipse中如何debug 调试程序
- 解决Java调用Azure SDK证书错误javax.net.ssl.SSLHandshakeException