From: Scott Cantor Date: Mon, 3 Aug 2009 18:06:47 +0000 (+0000) Subject: https://issues.shibboleth.net/jira/browse/CPPOST-28 X-Git-Tag: 2.2.1~12 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-opensaml.git;a=commitdiff_plain;h=98a847aa72947edf5536d8f7c63081d745f5a9ae https://issues.shibboleth.net/jira/browse/CPPOST-28 --- diff --git a/saml/saml2/metadata/MetadataCredentialCriteria.h b/saml/saml2/metadata/MetadataCredentialCriteria.h index 7d57810..5d3a1c7 100644 --- a/saml/saml2/metadata/MetadataCredentialCriteria.h +++ b/saml/saml2/metadata/MetadataCredentialCriteria.h @@ -1,5 +1,5 @@ /* - * Copyright 2001-2007 Internet2 + * 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. @@ -64,10 +64,10 @@ namespace opensaml { const MetadataCredentialContext* context = dynamic_cast(credential.getCredentalContext()); if (context) { // Check for a usage mismatch. - if ((getUsage() | (xmltooling::Credential::SIGNING_CREDENTIAL & xmltooling::Credential::TLS_CREDENTIAL)) && + if ((getUsage() & (xmltooling::Credential::SIGNING_CREDENTIAL | xmltooling::Credential::TLS_CREDENTIAL)) && XMLString::equals(context->getKeyDescriptor().getUse(),KeyDescriptor::KEYTYPE_ENCRYPTION)) return false; - else if ((getUsage() | xmltooling::Credential::ENCRYPTION_CREDENTIAL) && + else if ((getUsage() & xmltooling::Credential::ENCRYPTION_CREDENTIAL) && XMLString::equals(context->getKeyDescriptor().getUse(),KeyDescriptor::KEYTYPE_SIGNING)) return false; }