-/*
- * Copyright 2001-2009 Internet2
+/**
+ * Licensed to the University Corporation for Advanced Internet
+ * Development, Inc. (UCAID) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for
+ * additional information regarding copyright ownership.
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * UCAID licenses this file to you under the Apache License,
+ * Version 2.0 (the "License"); you may not use this file except
+ * in compliance with the License. You may obtain a copy of the
+ * License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the License.
*/
/**
#include "binding/SecurityPolicyRule.h"
#include "saml2/core/Assertions.h"
+#include <xercesc/util/XMLUniDefs.hpp>
+
using namespace opensaml::saml2md;
using namespace opensaml::saml2;
using namespace opensaml;
const xmltooling::QName* role,
const xmltooling::TrustEngine* trustEngine,
bool validate
- ) : m_metadataCriteria(NULL),
+ ) : m_metadataCriteria(nullptr),
m_issueInstant(0),
- m_issuer(NULL),
- m_issuerRole(NULL),
+ m_issuer(nullptr),
+ m_issuerRole(nullptr),
m_authenticated(false),
- m_matchingPolicy(NULL),
+ m_matchingPolicy(nullptr),
m_metadata(metadataProvider),
- m_role(NULL),
+ m_role(nullptr),
m_trust(trustEngine),
m_validate(validate),
m_entityOnly(true),
time_t SecurityPolicy::getTime() const
{
if (m_ts == 0)
- return m_ts = time(NULL);
+ return m_ts = time(nullptr);
return m_ts;
}
void SecurityPolicy::setRole(const xmltooling::QName* role)
{
delete m_role;
- m_role = role ? new xmltooling::QName(*role) : NULL;
+ m_role = role ? new xmltooling::QName(*role) : nullptr;
}
void SecurityPolicy::setTrustEngine(const TrustEngine* trust)
m_issueInstant=0;
if (!messageOnly) {
delete m_issuer;
- m_issuer=NULL;
- m_issuerRole=NULL;
+ m_issuer=nullptr;
+ m_issuerRole=nullptr;
m_authenticated=false;
}
}
if (!m_issuer) {
if (m_entityOnly && issuer->getFormat() && !XMLString::equals(issuer->getFormat(), NameIDType::ENTITY))
throw SecurityPolicyException("A non-entity Issuer was supplied, violating policy.");
- m_issuerRole = NULL;
+ m_issuerRole = nullptr;
m_issuer=issuer->cloneIssuer();
}
}
throw SecurityPolicyException("An Issuer was supplied that conflicts with previous results.");
if (!m_issuer && issuer && *issuer) {
- m_issuerRole = NULL;
+ m_issuerRole = nullptr;
m_issuer = IssuerBuilder::buildIssuer();
m_issuer->setName(issuer);
}
bool SecurityPolicy::IssuerMatchingPolicy::issuerMatches(const Issuer* issuer1, const Issuer* issuer2) const
{
- // NULL matches anything for the purposes of this interface.
+ // nullptr matches anything for the purposes of this interface.
if (!issuer1 || !issuer2)
return true;
bool SecurityPolicy::IssuerMatchingPolicy::issuerMatches(const Issuer* issuer1, const XMLCh* issuer2) const
{
- // NULL matches anything for the purposes of this interface.
+ // nullptr matches anything for the purposes of this interface.
if (!issuer1 || !issuer2 || !*issuer2)
return true;