-/*\r
- * Copyright 2001-2006 Internet2\r
- * \r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- * http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-\r
-/**\r
- * @file SigningContext.h\r
- * \r
- * Interface to signing process supplied by a signing application \r
- */\r
-\r
-#if !defined(__xmltooling_signctx_h__) && !defined(XMLTOOLING_NO_XMLSEC)\r
-#define __xmltooling_signctx_h__\r
-\r
-#include <xmltooling/signature/KeyInfo.h>\r
-#include <xmltooling/util/CredentialResolver.h>\r
-\r
-#include <vector>\r
-#include <xsec/dsig/DSIGSignature.hpp>\r
-\r
-#if defined (_MSC_VER)\r
- #pragma warning( push )\r
- #pragma warning( disable : 4250 4251 )\r
-#endif\r
-\r
-namespace xmlsignature {\r
-\r
- /**\r
- * Interface to signing process supplied by a signing application\r
- */\r
- class XMLTOOL_API SigningContext\r
- {\r
- MAKE_NONCOPYABLE(SigningContext);\r
- public:\r
- virtual ~SigningContext() {}\r
-\r
- /**\r
- * Given a "blank" native signature, asks the context to define the\r
- * appropriate signature transforms, references, etc. The context\r
- * should return true iff the necessary ds:KeyInfo information was\r
- * also attached.\r
- * \r
- * @param sig native signature interface\r
- * @return indicator whether ds:KeyInfo was created by context\r
- */\r
- virtual bool createSignature(DSIGSignature* sig)=0;\r
- \r
- /**\r
- * Gets a reference to a credential resolver.\r
- * The resolver's certificates will be included in the signature only\r
- * if the context returns false when creating the signature and returns\r
- * NULL from the getKeyInfo() method.\r
- * \r
- * \r
- * @return a resolver to the credentials to sign with\r
- */\r
- virtual xmltooling::CredentialResolver& getCredentialResolver()=0;\r
-\r
- /**\r
- * Gets a KeyInfo structure to embed.\r
- * Ownership of the object MUST be transferred to the caller.\r
- * \r
- * @return pointer to a KeyInfo structure, will be freed by caller\r
- */\r
- virtual KeyInfo* getKeyInfo()=0;\r
-\r
- protected:\r
- SigningContext() {}\r
- };\r
-\r
-};\r
-\r
-#if defined (_MSC_VER)\r
- #pragma warning( pop )\r
-#endif\r
-\r
-#endif /* __xmltooling_signctx_h__ */\r