X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=shibsp%2Fattribute%2FKeyInfoAttributeDecoder.cpp;h=c9e966e32e59c12b4dce87124285e7757e3f1569;hb=ef6a3893b59431063dd7c619129b2854218fe173;hp=741d5da248213bbd07d8da887cd5b5620700a65f;hpb=e8d53ac65da2624233ffd39c5a2a7dacc02a4b27;p=shibboleth%2Fcpp-sp.git diff --git a/shibsp/attribute/KeyInfoAttributeDecoder.cpp b/shibsp/attribute/KeyInfoAttributeDecoder.cpp index 741d5da..c9e966e 100644 --- a/shibsp/attribute/KeyInfoAttributeDecoder.cpp +++ b/shibsp/attribute/KeyInfoAttributeDecoder.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2009 Internet2 + * Copyright 2009-2010 Internet2 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -48,7 +48,7 @@ namespace shibsp { } Attribute* decode( - const vector& ids, const XMLObject* xmlObject, const char* assertingParty=NULL, const char* relyingParty=NULL + const vector& ids, const XMLObject* xmlObject, const char* assertingParty=nullptr, const char* relyingParty=nullptr ) const; private: @@ -59,7 +59,7 @@ namespace shibsp { if (!alg || !*alg) alg = "SHA1"; dest.push_back(string()); - dest.back() = SecurityHelper::getDEREncoding(*cred.get(), m_hash ? alg : NULL); + dest.back() = SecurityHelper::getDEREncoding(*cred.get(), m_hash ? alg : nullptr); if (dest.back().empty()) dest.pop_back(); } @@ -88,13 +88,13 @@ namespace shibsp { KeyInfoAttributeDecoder::KeyInfoAttributeDecoder(const DOMElement* e) : AttributeDecoder(e), m_hash(false), - m_keyInfoHashAlg(e ? e->getAttributeNS(NULL, keyInfoHashAlg) : NULL), - m_keyInfoResolver(NULL) { - const XMLCh* flag = e ? e->getAttributeNS(NULL, _hash) : NULL; + m_keyInfoHashAlg(e ? e->getAttributeNS(nullptr, keyInfoHashAlg) : nullptr), + m_keyInfoResolver(nullptr) { + const XMLCh* flag = e ? e->getAttributeNS(nullptr, _hash) : nullptr; m_hash = (flag && (*flag == chLatin_t || *flag == chDigit_1)); - e = e ? XMLHelper::getFirstChildElement(e,_KeyInfoResolver) : NULL; + e = e ? XMLHelper::getFirstChildElement(e,_KeyInfoResolver) : nullptr; if (e) { - auto_ptr_char t(e->getAttributeNS(NULL, _type)); + auto_ptr_char t(e->getAttributeNS(nullptr, _type)); if (t.get() && *t.get()) m_keyInfoResolver = XMLToolingConfig::getConfig().KeyInfoResolverManager.newPlugin(t.get(), e); else @@ -110,7 +110,7 @@ Attribute* KeyInfoAttributeDecoder::decode( if (!xmlObject || !XMLString::equals(saml1::Attribute::LOCAL_NAME, xmlObject->getElementQName().getLocalPart())) { log.warn("XMLObject type not recognized by KeyInfoAttributeDecoder, no values returned"); - return NULL; + return nullptr; } auto_ptr attr(new SimpleAttribute(ids)); @@ -146,7 +146,7 @@ Attribute* KeyInfoAttributeDecoder::decode( } else { log.warn("XMLObject type not recognized by KeyInfoAttributeDecoder, no values returned"); - return NULL; + return nullptr; } } @@ -165,5 +165,5 @@ Attribute* KeyInfoAttributeDecoder::decode( } } - return dest.empty() ? NULL : _decode(attr.release()); + return dest.empty() ? nullptr : _decode(attr.release()); }