allow commonName to be overridden in inithooks.conf
simplify test logic