Rewriting certificate creation process