Added ability to generate self-signed certificate