Invalid keystore format mit SSL in Tomcat 6

Ich versuche zum einrichten von SSL in meinem lokalen Tomcat 6 installation. Für diese habe ich die offizielle How-To Sie Folgendes tun:

$JAVA_HOME/bin/keytool -genkey -v -keyalg RSA -alias
          tomcat -keypass changeit -storepass changeit
$JAVA_HOME/bin/keytool -export -alias tomcat -storepass
          changeit -file /root/server.crt

Dann ändern $CATALINA_BASE/conf/server.xml in-kommentieren diese:

<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
           maxThreads="150" scheme="https" secure="true"
           clientAuth="false" sslProtocol="TLS"
           keystoreFile="/root/.keystore" keystorePass="changeit" />

Nach dem Start von Tomcat bekomme ich diese Exception:

INFO: Initializing Coyote HTTP/1.1 on http-8080
30.06.2011 10:15:24 org.apache.tomcat.util.net.jsse.JSSESocketFactory getStore
SCHWERWIEGEND: Failed to load keystore type JKS with path /root/.keystore
due to Invalid keystore format
java.io.IOException: Invalid keystore format
      at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:633)
      at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:38)
      at java.security.KeyStore.load(KeyStore.java:1185)

Wenn ich einen Blick in den keystore mit keytool -list bekomme ich

root@host:~# $JAVA_HOME/bin/keytool -list
Enter key store password: changeit
Key store type: gkr
Key store provider: GNU-CRYPTO

Key store contains 1 entry(ies)

Alias name: tomcat
Creation timestamp: Donnerstag, 30. Juni 2011 - 10:13:40 MESZ
Entry type: key-entry
Certificate fingerprint (MD5): 6A:B9:...C:89:1C

Offensichtlich, wird die keystore-Typen sind unterschiedlich. Wie kann ich den Typ ändern und wird in diesem Update mein problem? Danke!

InformationsquelleAutor strauberry | 2011-06-30
Schreibe einen Kommentar