Merge branch '1.x' of ssh://authdev.it.ohio-state.edu/~scantor/git/cpp-xmltooling...
[shibboleth/cpp-xmltooling.git] / xmltooling / security / KeyInfoResolver.h
index 56ade75..c210149 100644 (file)
@@ -1,17 +1,21 @@
-/*
- *  Copyright 2001-2007 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.
+ *
+ * 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
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ * 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.
+ * 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.
  */
 
 /**
 #if !defined(__xmltooling_keyres_h__) && !defined(XMLTOOLING_NO_XMLSEC)
 #define __xmltooling_keyres_h__
 
-#include <xmltooling/security/Credential.h>
-#include <xmltooling/security/CredentialCriteria.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.
      *
@@ -43,9 +54,9 @@ namespace xmltooling {
     class XMLTOOL_API KeyInfoResolver {
         MAKE_NONCOPYABLE(KeyInfoResolver);
     protected:
-        KeyInfoResolver() {}
+        KeyInfoResolver();
     public:
-        virtual ~KeyInfoResolver() {}
+        virtual ~KeyInfoResolver();
         
         /**
          * Returns a credential based on the supplied KeyInfo information.
@@ -53,7 +64,7 @@ namespace xmltooling {
          * 
          * @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;
 
@@ -63,7 +74,7 @@ namespace xmltooling {
          * 
          * @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;
 
@@ -75,7 +86,7 @@ namespace xmltooling {
          * 
          * @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;
 
@@ -85,7 +96,7 @@ namespace xmltooling {
          * 
          * @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;
 
@@ -95,7 +106,7 @@ namespace xmltooling {
          * 
          * @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;
     };