generalized get_ca_certificate() to get_auth_certificate(auth_flags)