Improve certificate creation api

A few fixes so I can run reimports and london datastore import again.