From bea93e7b7f10bad0cbd4c92e0841b56499b480bc Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Mon, 23 May 2011 13:48:36 -0400 Subject: [PATCH] support BinaryAttribute subclasses --- mech_eap/util_shib.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mech_eap/util_shib.cpp b/mech_eap/util_shib.cpp index ba83762..6124484 100644 --- a/mech_eap/util_shib.cpp +++ b/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