Custom KeyInfo support in signature creation.
[shibboleth/xmltooling.git] / xmltooling / signature / SigningContext.h
index af2e7f4..520e2d3 100644 (file)
@@ -23,6 +23,8 @@
 #if !defined(__xmltooling_signctx_h__) && !defined(XMLTOOLING_NO_XMLSEC)\r
 #define __xmltooling_signctx_h__\r
 \r
+#include <xmltooling/signature/KeyInfo.h>\r
+\r
 #include <vector>\r
 #include <xsec/dsig/DSIGSignature.hpp>\r
 \r
@@ -61,8 +63,18 @@ namespace xmlsignature {
          * \r
          * @return  an immutable collection of certificates to embed\r
          */\r
-        virtual const std::vector<XSECCryptoX509*>& getX509Certificates() const=0;\r
-        \r
+        virtual const std::vector<XSECCryptoX509*>* getX509Certificates() const=0;\r
+\r
+        /**\r
+         * Gets a KeyInfo structure to embed.\r
+         * Ownership of the object MUST be transferred to the caller.\r
+         * This method will only be called if no certificates are returned from\r
+         * the getX509Certificates() method.\r
+         * \r
+         * @return  pointer to a KeyInfo structure, will be freed by caller\r
+         */\r
+        virtual KeyInfo* getKeyInfo() const=0;\r
+\r
         /**\r
          * Gets the signing key to use.\r
          * Must be compatible with the intended signature algorithm. Ownership of the key\r