From: Luke Howard Date: Mon, 13 Sep 2010 14:56:16 +0000 (+0200) Subject: fix some linkage errors X-Git-Tag: vm/20110310~324 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=mech_eap.orig;a=commitdiff_plain;h=ea7c7d8a1509c94f85db85b2e925ecc0ca5384b9 fix some linkage errors --- diff --git a/acinclude.m4 b/acinclude.m4 index 133c86b..8ac594b 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -30,7 +30,7 @@ if test x_$found_krb5 != x_yes; then ]) else printf "Kerberos found in $krb5dir\n"; - KRB5_LIBS="-lgssapi_krb5 -lkrb5"; + KRB5_LIBS="-lgssapi_krb5 -lkrb5 -lk5crypto"; KRB5_LDFLAGS="-L$krb5dir/lib"; AC_SUBST(KRB5_CFLAGS) AC_SUBST(KRB5_LDFLAGS) @@ -133,7 +133,7 @@ if test x_$found_shibsp != x_yes; then ]) else printf "Shibboleth found in $shibspdir\n"; - SHIBSP_LIBS="-lshibsp -lsaml -lxml-security-c -lxmltooling -lxerces-c"; + SHIBSP_LIBS="-lshibsp -llog4shib -lsaml -lxml-security-c -lxmltooling -lxerces-c"; SHIBSP_LDFLAGS="-L$shibspdir/lib"; AC_SUBST(SHIBSP_CXXFLAGS) AC_SUBST(SHIBSP_LDFLAGS) diff --git a/util_saml.cpp b/util_saml.cpp index 377cd60..34e494a 100644 --- a/util_saml.cpp +++ b/util_saml.cpp @@ -114,18 +114,30 @@ private: struct eap_gss_saml_attr_ctx { public: - eap_gss_saml_attr_ctx(); - eap_gss_saml_attr_ctx(const gss_buffer_t buffer); - eap_gss_saml_attr_ctx(const Assertion *assertion); + eap_gss_saml_attr_ctx(const gss_buffer_t buffer) { + parseAssertion(buffer); + } eap_gss_saml_attr_ctx(const vector& attributes, - const Assertion *assertion); + const Assertion *assertion = NULL) { + if (assertion != NULL) + m_assertion = dynamic_cast(assertion->clone()); + if (attributes.size()) + setAttributes(attributes); + } eap_gss_saml_attr_ctx(const eap_gss_saml_attr_ctx &ctx) { eap_gss_saml_attr_ctx(ctx.m_attributes, ctx.m_assertion); } - ~eap_gss_saml_attr_ctx(); + eap_gss_saml_attr_ctx() {} + ~eap_gss_saml_attr_ctx() { + for_each(m_attributes.begin(), + m_attributes.end(), + xmltooling::cleanup()) + ; + delete m_assertion; + } const vector getAttributes(void) const { return m_attributes; @@ -168,24 +180,6 @@ private: bool parseAssertion(const gss_buffer_t buffer); }; -eap_gss_saml_attr_ctx::eap_gss_saml_attr_ctx(const vector& attributes, - const Assertion *assertion) -{ - m_assertion = dynamic_cast(assertion->clone()); - setAttributes(attributes); -} - -eap_gss_saml_attr_ctx::~eap_gss_saml_attr_ctx() -{ - for_each(m_attributes.begin(), m_attributes.end(), xmltooling::cleanup()); - delete m_assertion; -} - -eap_gss_saml_attr_ctx::eap_gss_saml_attr_ctx(const gss_buffer_t buffer) -{ - parseAssertion(buffer); -} - static OM_uint32 mapException(OM_uint32 *minor, exception &e) { @@ -745,7 +739,7 @@ samlDuplicateAttrContext(OM_uint32 *minor, } OM_uint32 -samlMapNametoAny(OM_uint32 *minor, +samlMapNameToAny(OM_uint32 *minor, const struct eap_gss_saml_attr_ctx *ctx, int authenticated, gss_buffer_t type_id, diff --git a/util_saml.h b/util_saml.h index fd5b9cd..c3b0525 100644 --- a/util_saml.h +++ b/util_saml.h @@ -101,7 +101,7 @@ samlGetAssertion(OM_uint32 *minor, OM_uint32 -samlMapNametoAny(OM_uint32 *minor, +samlMapNameToAny(OM_uint32 *minor, const struct eap_gss_saml_attr_ctx *ctx, int authenticated, gss_buffer_t type_id,