I have seen Where to find Java 6 JSSE/JCE Source Code? and asked the question myself How to get JRE/JDK with matching source? but I don\'t either of these was specific enough
I used the OpenJDK download for Java 6:
http://download.java.net/openjdk/jdk6/
To debug the JSSE/SSL code, I used the classes found in the sun.security.ssl and sun.security.ec packages and created a new library. Unfortunately, just having a library with all the source wasn't enough for me. I couldn't figure out how to get my IDE (Netbeans) to step into the JSSE code. Instead, it was calling the JSSE bundled with my JDK.
As a workaround, I ended up refactoring the ssl and ec packages into a new "Provider". Here's what I did:
Once I had a new security provider, I could reference it explicitly in my code. Example:
java.security.Provider provider = new javaxt.ssl.SSLProvider();
java.security.Security.addProvider(provider);
SSLContext sslc = SSLContext.getInstance("TLS", "SSLProvider");
By explicitly setting the security provider, I can now drop breakpoints and throw out print statements to my heart's content :-)
If anyone is interested, I have posted a zip archive of the "SSLProvider" source here:
http://www.javaxt.com/download/?/jsse/SSLProvider.zip