Don't regenerate in wolfSSL_PEM_write_bio_X509().
Before creating any new configure files (.conf) read the CONF_FILES_README.md