tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Imanol Apaolaza Sanz <iapaol...@unav.es>
Subject java.net.SocketException: Default SSL context init failed: Keystore was tampered with, or password was incorrect
Date Thu, 24 Oct 2002 08:31:02 GMT
Hello,

    I want to create SSL conexions between my tomacat 4.0.6 an my
OpenLdap v3 server. With Windows XP platform I havenĀ“t got any problem ,
but in Linux I recieve this message in the log:

"Error: LDAPException: Unable to connect to server xxx.xxx.xxx.xxx:636
(91) Connect Error
java.net.SocketException: Default SSL context init failed: Keystore was
tampered with, or password was incorrect"

My keystore is ok because running de aplication in command line, the
results are corrects. I am using j2sdk 1.4.02. with Novell ndk classes


Here a fragment of mi code:
  String host="xxx.xxx.xxx.xxx";
  String cnFinal="";
  String loginDN="";
  String password="";
  int ldapVersion=3;
  String path="/root/.keystore";
  LDAPSocketFactory ssf;

  try{
   Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

   System.setProperty("javax.net.ssl.trustStore", path);
   ssf = new LDAPJSSESecureSocketFactory();

   LDAPConnection.setSocketFactory(ssf);

   LDAPConnection lc = new LDAPConnection();

   lc.connect(host,port);

   lc.bind(ldapVersion,loginDN,password);




--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message