Fully qualify the header filenames for doxygen.
[shibboleth/cpp-xmltooling.git] / xmltooling / signature / Signature.h
index a86bd71..76e80d1 100644 (file)
@@ -15,7 +15,7 @@
  */
 
 /**
- * @file Signature.h
+ * @file xmltooling/signature/Signature.h
  * 
  * XMLObject representing XML Digital Signature, version 20020212, Signature element. 
  */
@@ -52,7 +52,21 @@ namespace xmlsignature {
         static const XMLCh LOCAL_NAME[];
 
         /**
-         * Sets the canonicalization method for the ds:SignedInfo element
+         * Gets the canonicalization method for the ds:SignedInfo element.
+         * 
+         * @return the canonicalization method
+         */
+        virtual const XMLCh* getCanonicalizationMethod() const=0;
+        
+        /**
+         * Gets the signing algorithm for the signature.
+         * 
+         * @return    the signature algorithm
+         */
+        virtual const XMLCh* getSignatureAlgorithm() const=0;
+
+        /**
+         * Sets the canonicalization method for the ds:SignedInfo element.
          * 
          * @param c14n  the canonicalization method
          */
@@ -122,8 +136,10 @@ namespace xmlsignature {
         /**
          * Compute and append the signature based on the assigned
          * ContentReference, KeyInfo, and signing key.
+         *
+         * @param credential    optional source of signing key and KeyInfo
          */
-        virtual void sign()=0;
+        virtual void sign(const xmltooling::Credential* credential=NULL)=0;
 
         /**
          * Type-safe clone operation.
@@ -177,6 +193,14 @@ namespace xmlsignature {
             unsigned int in_len
             );
 
+        /**
+         * Populates a set of key names using the information found in a native KeyInfo object.
+         *
+         * @param keyInfo   a native KeyInfo object
+         * @param names     a set of names to populate
+         */
+        static void extractNames(DSIGKeyInfoList* keyInfo, std::set<std::string>& names);
+
     protected:
         Signature() {}
     };