def METHOD_NAME(cert_name):
    home = fileoperations.get_home()
    cert_dir = os.path.join(home, '.ssl')
    privatekey_filename = cert_name + '-privatekey.pem'
    privatekey_dir = os.path.join(cert_dir, privatekey_filename)
    sign_request_filename = cert_name + '-csr.pem'
    sign_request_dir = os.path.join(cert_dir, sign_request_filename)
    server_cert_filename = cert_name + '.crt'
    server_cert_dir = os.path.join(cert_dir, server_cert_filename)
    if not os.path.isdir(cert_dir):
        os.mkdir(cert_dir)
    io.log_warning('Generating a self-signed certificate. '
                   'To provide an already created certificate, '
                   'use the command options.'
                   '\nSee "eb labs setup-ssl --help" for more info.')
    if not fileoperations.program_is_installed('openssl'):
        raise CommandError('This command requires openssl to be '
                           'installed on the PATH')
    if not os.path.isfile(privatekey_dir):
        utils.exec_cmd_quiet(['openssl', 'genrsa', '-out', privatekey_dir])
    if not os.path.isfile(sign_request_dir):
        io.echo()
        subprocess.check_call(['openssl', 'req', '-new',
                               '-key', privatekey_dir,
                               '-out', sign_request_dir])
        io.echo()
    if not os.path.isfile(server_cert_dir):
        utils.exec_cmd_quiet(['openssl', 'x509', '-req', '-days', '365',
                              '-in', sign_request_dir,
                              '-signkey', privatekey_dir,
                              '-out', server_cert_dir])
    return privatekey_dir, server_cert_dir