partial version of type_to_cert