X-Git-Url: http://www.project-moonshot.org/gitweb/?a=blobdiff_plain;f=saml%2Fbinding%2Fimpl%2FClientCertAuthRule.cpp;h=6438b8bcec90e44941fc5087a019b40377bd4c17;hb=f1208cd2f514700244816377443c4951dc22c848;hp=382eb106d9d0b34970f29bf25c3e6e9c3a80a8d9;hpb=3582107119b14aeb81632921dd9442ef52cf64db;p=shibboleth%2Fcpp-opensaml.git diff --git a/saml/binding/impl/ClientCertAuthRule.cpp b/saml/binding/impl/ClientCertAuthRule.cpp index 382eb10..6438b8b 100644 --- a/saml/binding/impl/ClientCertAuthRule.cpp +++ b/saml/binding/impl/ClientCertAuthRule.cpp @@ -1,33 +1,39 @@ -/* - * Copyright 2001-2009 Internet2 - * - * 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 +/** + * 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. * - * http://www.apache.org/licenses/LICENSE-2.0 + * 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 * - * 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. + * 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. */ /** * ClientCertAuthRule.cpp * - * TLS client authentication SecurityPolicyRule + * TLS client authentication SecurityPolicyRule. */ #include "internal.h" #include "exceptions.h" +#include "binding/SecurityPolicy.h" #include "binding/SecurityPolicyRule.h" #include "saml2/metadata/Metadata.h" #include "saml2/metadata/MetadataCredentialCriteria.h" #include "saml2/metadata/MetadataProvider.h" #include +#include #include #include #include @@ -62,12 +68,8 @@ namespace opensaml { static const XMLCh errorFatal[] = UNICODE_LITERAL_10(e,r,r,o,r,F,a,t,a,l); }; -ClientCertAuthRule::ClientCertAuthRule(const DOMElement* e) : m_errorFatal(false) +ClientCertAuthRule::ClientCertAuthRule(const DOMElement* e) : m_errorFatal(XMLHelper::getAttrBool(e, false, errorFatal)) { - if (e) { - const XMLCh* flag = e->getAttributeNS(NULL, errorFatal); - m_errorFatal = (flag && (*flag==chLatin_t || *flag==chDigit_1)); - } } bool ClientCertAuthRule::evaluate(const XMLObject& message, const GenericRequest* request, SecurityPolicy& policy) const @@ -88,7 +90,7 @@ bool ClientCertAuthRule::evaluate(const XMLObject& message, const GenericRequest return false; } - const std::vector& chain = request->getClientCertificates(); + const vector& chain = request->getClientCertificates(); if (chain.empty()) return false;