2 * Copyright 2001-2010 Internet2
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 * @file xmltooling/security/KeyInfoCredentialContext.h
20 * Context for credentials resolved out of a KeyInfo.
23 #if !defined(__xmltooling_keyinfocredctx_h__) && !defined(XMLTOOLING_NO_XMLSEC)
24 #define __xmltooling_keyinfocredctx_h__
26 #include <xmltooling/security/CredentialContext.h>
28 class DSIGKeyInfoList;
30 namespace xmlsignature {
31 class XMLTOOL_API KeyInfo;
34 namespace xmltooling {
37 * Context for credentials resolved out of a KeyInfo.
39 class XMLTOOL_API KeyInfoCredentialContext : public CredentialContext
45 * @param keyInfo surrounding KeyInfo context object
47 KeyInfoCredentialContext(const xmlsignature::KeyInfo* keyInfo=nullptr);
52 * @param keyInfo surrounding native KeyInfo context object
54 KeyInfoCredentialContext(DSIGKeyInfoList* keyInfo);
56 virtual ~KeyInfoCredentialContext();
59 * Gets the KeyInfo context.
61 * @return the KeyInfo context
63 const xmlsignature::KeyInfo* getKeyInfo() const;
66 * Gets the native KeyInfo context.
68 * @return the native KeyInfo context
70 DSIGKeyInfoList* getNativeKeyInfo() const;
73 const xmlsignature::KeyInfo* m_keyInfo;
74 DSIGKeyInfoList* m_nativeKeyInfo;
78 #endif /* __xmltooling_keyinfocredctx_h__ */