服务器端是linux系统,tomcat 4.0 
1.技术支持部的同事已经在服务器上 新建了tomcat.keystore. 
并且在tomcat 下的server.xml 添加如下代码     <Connector className="org.apache.coyote.tomcat4.CoyoteConnector" 
              port="8443" minProcessors="5" maxProcessors="75" 
              enableLookups="true" 
              acceptCount="100" debug="0" scheme="https" secure="true" 
              useURIValidationHack="false" disableUploadTimeout="true"> 
      <Factory className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory" 
              clientAuth="false" protocol="TLS" 
keystoreFile="/usr/local/pkg/Tomcat/conf/tomcat.keystore" 
keystorePass="123456" 
keystoreType="PKCS12"/> 2.从服务端导出密钥文件:keytool -export -file server.crt -alias tomcat,输入上一步中的密码,结果在当前目录生成server.crt密钥文件 3.我把服务器端的server.crt 拷贝到D:\Program Files\Java\jdk1.5.0_12 (这是我的jdk1.5安装路径) 
keytool -import -file server.crt -keystore ./jre/lib/security/cacerts 出现 keytool错误: java.io.IOException: Keystore was tampered with, or p 
ncorrect 
请高人指点!!!

解决方案 »

  1.   

    http://topic.csdn.net/u/20090715/10/6392c236-c9ec-448d-90d3-2aae660afe7b.html?seed=1156929103
      

  2.   

    密码错误了。试试:
    keytool -import -file server.crt -keystore ./jre/lib/security/cacerts -storepass changeit
      

  3.   

    我现在调试一个erp系统,代码在本机上。
    里面的链接数据库的 都该成 https了
    每次运行都出现以下错误
    -1& HttpPostClient occur errorjavax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    是不是与证书有很大的关系?
      

  4.   

    这个问题是由于./jre/lib/security/cacerts这个文件已经存在,我前两天也遇到了,把cacerts删除就可以了,但是删除后具体有什么影响我还不知道。
      

  5.   

    ./jre/lib/security/cacerts 文件 在你安装jdk 时就已经存在了