/*
- * Copyright 2001-2007 Internet2
+ * Copyright 2001-2010 Internet2
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
#if !defined(__xmltooling_keyres_h__) && !defined(XMLTOOLING_NO_XMLSEC)
#define __xmltooling_keyres_h__
-#include <xmltooling/security/Credential.h>
-#include <xmltooling/security/KeyInfoCredentialContext.h>
+#include <xmltooling/base.h>
-#include <xsec/dsig/DSIGKeyInfoList.hpp>
+class DSIGKeyInfoList;
+
+namespace xmlsignature {
+ class XMLTOOL_API KeyInfo;
+ class XMLTOOL_API Signature;
+};
namespace xmltooling {
+ class XMLTOOL_API Credential;
class XMLTOOL_API CredentialCriteria;
+ class XMLTOOL_API KeyInfoCredentialContext;
/**
* Resolves credentials from KeyInfo information.
class XMLTOOL_API KeyInfoResolver {
MAKE_NONCOPYABLE(KeyInfoResolver);
protected:
- KeyInfoResolver() {}
+ KeyInfoResolver();
public:
- virtual ~KeyInfoResolver() {}
+ virtual ~KeyInfoResolver();
/**
* Returns a credential based on the supplied KeyInfo information.
*
* @param keyInfo the key information
* @param types types of credentials to resolve, or 0 for any/all
- * @return the resolved credential, or NULL
+ * @return the resolved credential, or nullptr
*/
virtual Credential* resolve(const xmlsignature::KeyInfo* keyInfo, int types=0) const=0;
*
* @param keyInfo the key information
* @param types types of credentials to resolve, or 0 for any/all
- * @return the resolved credential, or NULL
+ * @return the resolved credential, or nullptr
*/
virtual Credential* resolve(DSIGKeyInfoList* keyInfo, int types=0) const=0;
*
* @param context context containing the key information
* @param types types of credentials to resolve, or 0 for any/all
- * @return the resolved credential, or NULL
+ * @return the resolved credential, or nullptr
*/
virtual Credential* resolve(KeyInfoCredentialContext* context, int types=0) const=0;
*
* @param sig signature containing the key information
* @param types types of credentials to resolve, or 0 for any/all
- * @return the resolved credential, or NULL
+ * @return the resolved credential, or nullptr
*/
Credential* resolve(const xmlsignature::Signature* sig, int types=0) const;
*
* @param criteria criteria containing the key information
* @param types types of credentials to resolve, or 0 for any/all
- * @return the resolved credential, or NULL
+ * @return the resolved credential, or nullptr
*/
Credential* resolve(const CredentialCriteria& criteria, int types=0) const;
};