added support for generating self-signed certificates