X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-opensaml.git;a=blobdiff_plain;f=saml%2Fsaml2%2Fmetadata%2Fimpl%2FAbstractMetadataProvider.cpp;fp=saml%2Fsaml2%2Fmetadata%2Fimpl%2FAbstractMetadataProvider.cpp;h=e7d0cd5858c3b1773d47c72886f8a6e742ce57ee;hp=3c404e1e0ac7838e0315b2cddfb5a319735192f1;hb=16d5976c9821b70d95675983702e0032d8769467;hpb=48ddc68b48bbc752bbf044dce2c71e0af115d447 diff --git a/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp b/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp index 3c404e1..e7d0cd5 100644 --- a/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp +++ b/saml/saml2/metadata/impl/AbstractMetadataProvider.cpp @@ -48,11 +48,11 @@ static const XMLCh type[] = UNICODE_LITERAL_4(t,y,p,e); AbstractMetadataProvider::AbstractMetadataProvider(const DOMElement* e) : ObservableMetadataProvider(e), m_resolver(nullptr), m_credentialLock(nullptr) { - e = e ? XMLHelper::getFirstChildElement(e, _KeyInfoResolver) : nullptr; + e = XMLHelper::getFirstChildElement(e, _KeyInfoResolver); if (e) { - auto_ptr_char t(e->getAttributeNS(nullptr,type)); - if (t.get()) - m_resolver = XMLToolingConfig::getConfig().KeyInfoResolverManager.newPlugin(t.get(),e); + string t = XMLHelper::getAttrString(e, nullptr, type); + if (!t.empty()) + m_resolver = XMLToolingConfig::getConfig().KeyInfoResolverManager.newPlugin(t.c_str(), e); else throw UnknownExtensionException(" element found with no type attribute"); }