def METHOD_NAME(self):
    self.logIt("Generating certificate", pbar=self.service_name)
    # generate oxd-server.keystore for the hostname
    self.run([
        paths.cmd_openssl,
        'req', '-x509', '-newkey', 'rsa:4096', '-nodes',
        '-out', '/tmp/oxd.crt',
        '-keyout', '/tmp/oxd.key',
        '-days', '3650',
        '-subj', '/C={}/ST={}/L={}/O={}/CN={}/emailAddress={}'.format(Config.countryCode, Config.state, Config.city, Config.orgName, Config.hostname, Config.admin_email),
        ])
    self.run([
        paths.cmd_openssl,
        'pkcs12', '-export',
        '-in', '/tmp/oxd.crt',
        '-inkey', '/tmp/oxd.key',
        '-out', '/tmp/oxd.p12',
        '-name', Config.hostname,
        '-passout', 'pass:example'
        ])
    self.run([
        Config.cmd_keytool,
        '-importkeystore',
        '-deststorepass', 'example',
        '-destkeypass', 'example',
        '-destkeystore', '/tmp/oxd.keystore',
        '-srckeystore', '/tmp/oxd.p12',
        '-srcstoretype', 'PKCS12',
        '-srcstorepass', 'example',
        '-alias', Config.hostname,
        ])
    oxd_keystore_fn = os.path.join(self.oxd_root, 'conf/oxd-server.keystore')
    self.run(['cp', '-f', '/tmp/oxd.keystore', oxd_keystore_fn])
    self.run([paths.cmd_chown, 'jetty:jetty', oxd_keystore_fn])
    for f in ('/tmp/oxd.crt', '/tmp/oxd.key', '/tmp/oxd.p12', '/tmp/oxd.keystore'):
        self.run([paths.cmd_rm, '-f', f])