Fixing strange bugs in getCertNames

Avoid reading input to stringbuf and then parsing. boost::tokenizer can
work directly on streams (with some hacks).