Only set the name string in one place, keeping a length of the name type to copy. Also only move cert data index once. Reset certificate extension policy number/count in case of malicious cert with multiple policy extensions.
Before creating any new configure files (.conf) read the CONF_FILES_README.md