/*
- * 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.
}
Attribute* decode(
- const vector<string>& ids, const XMLObject* xmlObject, const char* assertingParty=NULL, const char* relyingParty=NULL
+ const vector<string>& ids, const XMLObject* xmlObject, const char* assertingParty=nullptr, const char* relyingParty=nullptr
) const;
private:
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();
}
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
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<SimpleAttribute> attr(new SimpleAttribute(ids));
}
else {
log.warn("XMLObject type not recognized by KeyInfoAttributeDecoder, no values returned");
- return NULL;
+ return nullptr;
}
}
}
}
- return dest.empty() ? NULL : _decode(attr.release());
+ return dest.empty() ? nullptr : _decode(attr.release());
}