fill in some missing parts in type_to_cert