@task
def generate_self_signed(ctx, domain):
 cmd = 'openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout {0}.key -out {0}.crt'.format(domain)
 ctx.run(cmd)

@ task def generate_self_signed ( ctx , domain ) : cmd = 'openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout {0}.key -out {0}.crt' . format ( domain ) ctx . run ( cmd )
generate self-signed ssl key and certificate .