Tagging 1.1 release.
[shibboleth/xmltooling.git] / xmltooling / security / BasicX509Credential.h
index 6b4b486..9241fd0 100644 (file)
@@ -61,6 +61,15 @@ namespace xmltooling {
         /** Key names (derived from credential, KeyInfo, or both). */
         std::set<std::string> m_keyNames;
 
+        /** Subject DN. */
+        std::string m_subjectName;
+
+        /** Issuer DN. */
+        std::string m_issuerName;
+
+        /** Serial number. */
+        std::string m_serial;
+
         /** The X.509 certificate chain. */
         std::vector<XSECCryptoX509*> m_xseccerts;
 
@@ -78,12 +87,17 @@ namespace xmltooling {
 
         /**
          * Initializes (or reinitializes) a ds:KeyInfo to represent the Credential.
+         *
+         * @param types the kinds of KeyInfo content to include 
          */
-        void initKeyInfo();
-        
+        void initKeyInfo(unsigned int types=0);
+
     public:
         virtual ~BasicX509Credential();
         
+        unsigned int getUsage() const {
+            return UNSPECIFIED_CREDENTIAL;
+        }
         const char* getAlgorithm() const;
         unsigned int getKeySize() const;
 
@@ -122,6 +136,20 @@ namespace xmltooling {
         XSECCryptoX509CRL* getCRL() const {
             return m_crl;
         }
+
+        const char* getSubjectName() const {
+            return m_subjectName.c_str();
+        }
+
+        const char* getIssuerName() const {
+            return m_issuerName.c_str();
+        }
+
+        const char* getSerialNumber() const {
+            return m_serial.c_str();
+        }
+
+        void extract();
     };
 };