From 46cd48af6af8556f19885f7902602142e8533910 Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Mon, 23 May 2011 13:48:36 -0400 Subject: [PATCH] support BinaryAttribute subclasses --- moonshot/mech_eap/util_shib.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/moonshot/mech_eap/util_shib.cpp b/moonshot/mech_eap/util_shib.cpp index ba83762..6124484 100644 --- a/moonshot/mech_eap/util_shib.cpp +++ b/moonshot/mech_eap/util_shib.cpp @@ -284,6 +284,7 @@ gss_eap_shib_attr_provider::getAttribute(const gss_buffer_t attr, int *more) const { const Attribute *shibAttr = NULL; + const BinaryAttribute *binaryAttr; gss_buffer_desc valueBuf = GSS_C_EMPTY_BUFFER; gss_buffer_desc displayValueBuf = GSS_C_EMPTY_BUFFER; int nvalues, i = *more; @@ -303,9 +304,8 @@ gss_eap_shib_attr_provider::getAttribute(const gss_buffer_t attr, if (i >= nvalues) return false; - if (typeid(*shibAttr) == typeid(BinaryAttribute)) { - const BinaryAttribute *binaryAttr = - dynamic_cast(shibAttr); + binaryAttr = dynamic_cast(shibAttr); + if (binaryAttr != NULL) { std::string str = binaryAttr->getValues()[*more]; valueBuf.value = (void *)str.data(); -- 2.1.4