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.