Bouncycastle now works!

Several key changes:

 - Adding the bcprov dependency
 - Using the JDK 1.5 to JDK 1.8 lib (rather than 1.5 onwards)
 - Re-enabling the SunJCE provider (?)
 - Adding the Bouncy Castle provider (not just BouncyCastleJsseProvider)

And, crucially, downloading the Java 1.6 Export Control Crypto extensions
and putting them in the jre/lib/security folder of the Java 1.6 JDK.

Note that there are still warnings printed, and I'm not 100% sure what the true
minimum required is, but Gemini is now working on JDK 1.6, which is a first,
and allows Windows 2000 capabilities.
2 files changed, 9 insertions(+), 2 deletions(-)

M pom.xml
M src/main/java/com/ajtjp/geminiclient/GeminiClient.java
M pom.xml +6 -1
@@ 13,7 13,12 @@ 
     <dependencies>
         <dependency>
             <groupId>org.bouncycastle</groupId>
-            <artifactId>bctls-jdk15on</artifactId>
+            <artifactId>bcprov-jdk15to18</artifactId>
+            <version>1.66</version>
+        </dependency>
+        <dependency>
+            <groupId>org.bouncycastle</groupId>
+            <artifactId>bctls-jdk15to18</artifactId>
             <version>1.66</version>
         </dependency>
     </dependencies>

          
M src/main/java/com/ajtjp/geminiclient/GeminiClient.java +3 -1
@@ 25,6 25,7 @@ import javax.net.ssl.SSLSocketFactory;
 import javax.net.ssl.TrustManager;
 import javax.net.ssl.TrustManagerFactory;
 import javax.net.ssl.X509TrustManager;
+import org.bouncycastle.jce.provider.BouncyCastleProvider;
 import org.bouncycastle.jsse.provider.BouncyCastleJsseProvider;
 
 /**

          
@@ 193,8 194,9 @@ public class GeminiClient {
 //            SSLContext sc = SSLContext.getInstance("TLSv1.2");
 
             Provider[] providers = Security.getProviders();
-            Security.removeProvider("SunJCE");
+//            Security.removeProvider("SunJCE");
             
+            Security.addProvider(new BouncyCastleProvider());
             Security.addProvider(new BouncyCastleJsseProvider());
             providers = Security.getProviders();