Forum

Unable to create a SSL binding

Hoe
9 September 2013, 14:22


Hiawatha version: 6.17.1
Operating System: Linux (wary-puppy 5.5)

Hi Folks,

I've tried to do the same thing to get a SSL binding discibed in http://www.hiawatha-webserver.org/howto/bindings.
But during restart of the server I got the follwing message:
Starting webserver: Error while reading certificate (chain) from /etc/hiawatha/serverkey.pem
bind https: Success
error!
The pem-File has only 1 section:
-----BEGIN RSA PRIVATE KEY-------
.
-----END RSA PRIVATE KEY-----
Is this ok? I can't see where my fault is.
I now my hiawatha version is rather old, but there is no newer package available in wary-puppy and I'm far away from compile my own.

Tom
Hugo Leisink
9 September 2013, 18:00
What you are missing is the certificate in the serverkey.pem file. The file should look like this:
-----BEGIN RSA PRIVATE KEY-------
<private key data>
-----END RSA PRIVATE KEY-----

-----BEGIN CERTIFICATE-----
<certificate data>
-----END CERTIFICATE-----


If you have any intermediate certificates, you can place them at the end of the file.
Hoe
9 September 2013, 19:10
How can I get one? I thought the private key I've created with openSSL like the description in the HowTo's is enough.
Hugo Leisink
10 September 2013, 09:10
Run the script extra/mkcert to create a self-signed certificate. It can be found inside the source package.
If you want one from an official Certificate Authority, please follow their instructions.

You can also create your own CA. To do so, read these instructions [www.leisink.net]. Yes, it's in Dutch. But Google Translate [translate.google.com] will be your friend.
Hoe
10 September 2013, 14:04
Thanks for the help. My fault was the script (from the HOWTO's), witch did not copied the certificate into the pem-File.
I copied the lines from the page in windows for the script and it does not work with CR+LF under linux.
And if you not know what you are doing, it will go wrong.
This topic has been closed.