cleanup a bit and move the string massaging into get_cert_alternative_subject_names