2 * Copyright 2001-2005 Internet2
\r
4 * Licensed under the Apache License, Version 2.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.apache.org/licenses/LICENSE-2.0
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
17 #include "internal.h"
\r
18 #include <saml/signature/SignatureProfileValidator.h>
\r
20 #include <xmltooling/signature/CredentialResolver.h>
\r
21 #include <xmltooling/signature/KeyInfo.h>
\r
22 #include <xmltooling/signature/SignatureValidator.h>
\r
24 using namespace xmlsignature;
\r
26 class _addcert : public std::binary_function<X509Data*,XSECCryptoX509*,void> {
\r
28 void operator()(X509Data* bag, XSECCryptoX509* cert) const {
\r
29 safeBuffer& buf=cert->getDEREncodingSB();
\r
30 X509Certificate* x=X509CertificateBuilder::buildX509Certificate();
\r
31 x->setValue(buf.sbStrToXMLCh());
\r
32 bag->getX509Certificates().push_back(x);
\r
36 class SAMLSignatureTestBase : public SAMLObjectBaseTestCase {
\r
38 CredentialResolver* m_resolver;
\r
42 SAMLObjectBaseTestCase::setUp();
\r
43 string config = data_path + "FilesystemCredentialResolver.xml";
\r
44 ifstream in(config.c_str());
\r
45 DOMDocument* doc=XMLToolingConfig::getConfig().getParser().parse(in);
\r
46 XercesJanitor<DOMDocument> janitor(doc);
\r
47 m_resolver = XMLToolingConfig::getConfig().CredentialResolverManager.newPlugin(
\r
48 FILESYSTEM_CREDENTIAL_RESOLVER,doc->getDocumentElement()
\r
54 SAMLObjectBaseTestCase::tearDown();
\r