projects
/
moonshot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0f93de8
)
support BinaryAttribute subclasses
author
Luke Howard
<lukeh@padl.com>
Mon, 23 May 2011 17:48:36 +0000
(13:48 -0400)
committer
Luke Howard
<lukeh@padl.com>
Mon, 23 May 2011 17:48:36 +0000
(13:48 -0400)
moonshot/mech_eap/util_shib.cpp
patch
|
blob
|
history
diff --git
a/moonshot/mech_eap/util_shib.cpp
b/moonshot/mech_eap/util_shib.cpp
index
ba83762
..
6124484
100644
(file)
--- 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;
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;
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 (i >= nvalues)
return false;
- if (typeid(*shibAttr) == typeid(BinaryAttribute)) {
- const BinaryAttribute *binaryAttr =
- dynamic_cast<const BinaryAttribute *>(shibAttr);
+ binaryAttr = dynamic_cast<const BinaryAttribute *>(shibAttr);
+ if (binaryAttr != NULL) {
std::string str = binaryAttr->getValues()[*more];
valueBuf.value = (void *)str.data();
std::string str = binaryAttr->getValues()[*more];
valueBuf.value = (void *)str.data();