From f9c13d9f7815f21b258b027279b9665a9199d2a7 Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Sat, 18 Sep 2010 17:23:50 +0200 Subject: [PATCH] cleanup marshalling code --- mech_eap/util_saml.cpp | 11 +++++++---- mech_eap/util_shib.cpp | 4 +++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/mech_eap/util_saml.cpp b/mech_eap/util_saml.cpp index 703fc38..9674a9d 100644 --- a/mech_eap/util_saml.cpp +++ b/mech_eap/util_saml.cpp @@ -249,13 +249,16 @@ gss_eap_saml_assertion_provider::initFromBuffer(const gss_eap_attr_ctx *ctx, if (!gss_eap_attr_provider::initFromBuffer(ctx, buffer)) return false; - assert(m_assertion == NULL); - if (buffer->length == 0) return true; + assert(m_assertion == NULL); + m_assertion = parseAssertion(buffer); - return (m_assertion != NULL); + if (m_assertion == NULL) + return false; + + return true; } bool @@ -435,7 +438,7 @@ bool gss_eap_saml_attr_provider::initFromBuffer(const gss_eap_attr_ctx *ctx, const gss_buffer_t buffer) { - return true; + return gss_eap_attr_provider::initFromBuffer(ctx, buffer); } bool diff --git a/mech_eap/util_shib.cpp b/mech_eap/util_shib.cpp index 7e1bbdd..f1d68ac 100644 --- a/mech_eap/util_shib.cpp +++ b/mech_eap/util_shib.cpp @@ -371,7 +371,9 @@ gss_eap_shib_attr_provider::initFromBuffer(const gss_eap_attr_ctx *ctx, return false; if (buffer->length == 0) - return false; + return true; + + assert(m_attributes.size() == 0); DDF attrs(NULL); string str((const char *)buffer->value, buffer->length); -- 2.1.4