#!/usr/bin/env python3

# modules are all in the parent directory
import sys
sys.path.append('..')

# import helpers from modules
from helpers import get_query_string, get_client_cert
from db import check_hash, set_name

TLS_CLIENT_HASH = get_client_cert(False) # don't default to response 20
user_name = get_query_string("What is your name?")
user_id = check_hash(TLS_CLIENT_HASH)
set_name(user_id, user_name)

print("# Name Change Page")
print()

print("Your name has been changed.")
print()
print("=> ../login Back to main page")


#vim:fenc=utf-8:ts=4:sw=4:sta:noet:sts=4:fdm=marker:ai
