Perforce Public Knowledge Base - Using P4Java and P4Eclipse with SSL enabled Perforce Servers
Reset Search
 

 

Article

Using P4Java and P4Eclipse with SSL enabled Perforce Servers

« Go Back

Information

 
Problem
Connection to an SSL enabled Perforce server fails with:
Error occurred during the SSL handshake: invalid SSL session
Solution

P4Java Release 2012.1 and later includes support for connecting to an SSL enabled Perforce Server.

For connection details, see the P4Java API User's guide section on "SSL Connection Support".

From that section:

The Perforce Server at release 2012.1 or higher supports 256-bit SSL connections.  Due to current US export control restrictions for some countries, the standard JDK package only comes with 128 bit encryption level cyphers. In order to use P4Java to connect to an SSL-enabled Perforce server, those living in eligible countries may download the unlimited strength JCE (Java Cryptography Extension) package and replace the current default cryptography jar files with the unlimited strength files.

The JCE package's README.txt file gives install instructions. 

In summary, replace the local_policy.jar and the US_export_policy.jar files found in the security directory

  <JAVA_HOME>/lib/security/local_policy.jar
  <JAVA_HOME>/lib/security/US_export_policy.jar

with the identically named files within the the download specific to your version of Java.  

This must be done on every machine running your P4Java client.  Running JVMs must be restarted.  Nothing needs to be done on the Perforce Server machine.

Oracle (Sun) JVMs:

Java 6:  http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html

Java 7:  http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html

Java 8:  http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html

IBM JVMs:

The JCE packages can be obtained by:

  • Go to http://www.ibm.com/developerworks/java/jdk/security/
  • Choose your Java Version
  • Navigate to "IBM SDK Policy files"
  • Go to the link provided at "Unlimited jurisdiction policy files can be obtained from the ibm.com web site."
  • Log in with your IBM ID
  • Download "FOR OLDER VERSIONS", because although the JRE is Java 7, it's OLDER than Java 7 SR 4



Determining JAVA_HOME for Eclipse

  1. Within Eclipse, click menu Help -> About Eclipse
  2. Click the Installation Details button.
  3. Select the Configuration tab
  4. Find the java.home property

    In the example below, the files to replace would be located in the "C:\Program Files\Java\jre7\lib\security" directory
    ...
    java.ext.dirs=C:\Program Files\Java\jre7\lib\ext;C:\Windows\Sun\Java\lib\ext
    java.home=C:\Program Files\Java\jre7
    java.io.tmpdir=d:\temp\tmp\
    ...
    

 

Related Links

Feedback

 

Was this article helpful?


   

Feedback

Please tell us how we can make this article more useful.

Characters Remaining: 255