29

我在哪里可以下载最新版本的 Java 的 JSSE 和 JCE 源代码?https://jdk6.dev.java.net/上提供的源代码构建不包括 javax.crypto (JCE) 包或 com.sun.net.ssl.internal (JSSE) 包。

无法调试这些类使得解决 SSL 问题变得异常困难。

4

6 回答 6

13

there: openjdk javax.net in the security group

src/share/classes/javax/net
src/share/classes/com/sun/net/ssl
src/share/classes/sun/security/ssl
src/share/classes/sun/net/www/protocol/https

also on this page:

src/share/classes/javax/crypto
src/share/classes/com/sun/crypto/provider
src/share/classes/sun/security/pkcs11
src/share/classes/sun/security/mscapi

These directories contain the core cryptography framework and three providers (SunJCE, SunPKCS11, SunMSCAPI). SunJCE contains Java implementations of many popular algorithms, and the latter two libraries allow calls made through the standard Java cryptography APIs to be routed into their respective native libraries.

于 2008-09-17T20:11:00.303 回答
4

我从以下位置下载了 src jar:http: //download.java.net/jdk6/source/

注意:这是一个自解压 jar,因此仅链接到它是行不通的。

......jar -xvf <filename>也不会工作。

你需要:java -jar <filename>

干杯,杰

于 2011-01-27T05:47:40.797 回答
2

如果您只想阅读源代码:

http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/sun/security/ssl/SSLSocketImpl.java

于 2011-08-29T08:13:36.970 回答
1

虽然这不能直接回答您的问题,但使用 javax.net.debug 系统属性帮助我解决了 SSL 问题。-Djavax.net.debug=all 几乎可以为您提供所有细节。JSSE Debugging Utilities中提供了相关文档。

注意:我已经看到在 Java 1.4 和可能的 1.5 级别上,带有选项“all”的输出不像在 Java 1.6 级别上使用相同选项那样完整。例如,1.6 显示了网络(套接字)读写的实际内容。也许 1.4 和 1.5 的某些级别也可以,但 1.6 更一致。

于 2008-09-30T22:29:19.360 回答
1

Jad放在您的系统路径上。为 Eclipse安装JadClipse插件。使用武力,阅读反编译的源代码。:-)

于 2008-09-17T20:17:26.933 回答
0

出于某种未知原因,Orcale 没有为 JSE 发布 source.jar 和 javadocs jar。我发现只有一个地方可以找到它们http://jdk7src.sourceforge.net/但它已过时且非官方。唯一的一种方法是克隆 OpenJDK 存储库

于 2016-03-12T10:42:06.603 回答