Page 1 of 1

Failure: Moving Apache SSL Certificate to Tomcat

PostPosted: 01. September 2009 15:31
by mitch355
I have already gotten and installed my SSL certificate on the Apache server and all seems fine there. My next task is to move/export the certificate from the apache side to the Tomcat side of the picture. The OpenSSL docs reference an export statement similar to this:

bin\openssl pkcs12 -export -in \xampp\apache\conf\ssl.crt\apache.crt
-inkey \xampp\apache\conf\ssl-key\server.key -out \xampp\tomcat\conf\key\tomcat.p12
-name tomcat -chain -CAfile \xampp\apache\conf\ssl.crt\gd_bundle.crt
-passout pass:changeit

I inserted some linebreaks to make it a little more readable. The problem is that the OPENSSL command fails with the following error:

Loading 'screen' into random state - done
Error opening private key \xampp\apache\conf\ssl-key\server.key
4336:error:02001003:system library:fopen:No such process:.\crypto\bio\bss_file.c
:356:fopen('\xampp\apache\conf\ssl-key\server.key','rb')
4336:error:20074002:BIO routines:FILE_CTRL:system lib:.\crypto\bio\bss_file.c:35
8:
unable to load private key

Can someone help me with the problem here? Is the private key not the same as the server.key that's installed?