Improves SSL certificate generation

Export the certificate in the PEM format instead of the DER format so it does not need to be converted before merging in the pem file.

Implements the proposed change described in #228.

Maybe the wiki should be updated too.

I've tested it and can confirm that everything still works as expected. But maybe it's interesting that somebody else confirms it too.