You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by mi...@apache.org on 2005/05/09 16:32:35 UTC
cvs commit: xml-security/c/src/xenc/impl XENCEncryptedDataImpl.hpp XENCEncryptedKeyImpl.hpp XENCEncryptedTypeImpl.cpp XENCEncryptedTypeImpl.hpp
milan 2005/05/09 07:32:35
Modified: c/src/xenc XENCEncryptedType.hpp
c/src/xenc/impl XENCEncryptedDataImpl.hpp
XENCEncryptedKeyImpl.hpp XENCEncryptedTypeImpl.cpp
XENCEncryptedTypeImpl.hpp
Log:
Added complete KeyInfo handling
Revision Changes Path
1.12 +46 -1 xml-security/c/src/xenc/XENCEncryptedType.hpp
Index: XENCEncryptedType.hpp
===================================================================
RCS file: /home/cvs/xml-security/c/src/xenc/XENCEncryptedType.hpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- XENCEncryptedType.hpp 3 Feb 2005 13:58:14 -0000 1.11
+++ XENCEncryptedType.hpp 9 May 2005 14:32:35 -0000 1.12
@@ -36,6 +36,8 @@
class XENCCipherData;
class DSIGKeyInfoList;
class DSIGKeyInfoName;
+class DSIGKeyInfoValue;
+class DSIGKeyInfoX509;
class XENCEncryptionMethod;
class XENCEncryptedKey;
@@ -264,6 +266,49 @@
virtual void clearKeyInfo(void) = 0;
/**
+ * \brief Append a DSA KeyValue element
+ *
+ * Add a new KeyInfo element for a DSA Value
+ *
+ * @param P Base64 encoded value of P
+ * @param Q Base64 encoded value of Q
+ * @param G Base64 encoded value of G
+ * @param Y Base64 encoded value of Y
+ * @returns A pointer to the created object.
+ */
+
+ virtual DSIGKeyInfoValue * appendDSAKeyValue(const XMLCh * P,
+ const XMLCh * Q,
+ const XMLCh * G,
+ const XMLCh * Y) = 0;
+
+ /**
+ * \brief Append a RSA KeyValue element
+ *
+ * Add a new KeyInfo element for a RSA Value
+ *
+ * @param modulus Base64 encoded value of the modulus
+ * @param exponent Base64 encoded value of exponent
+ * @returns A pointer to the created object.
+ */
+
+ virtual DSIGKeyInfoValue * appendRSAKeyValue(const XMLCh * modulus,
+ const XMLCh * exponent) = 0;
+
+ /**
+ * \brief Append a X509Data element.
+ *
+ * Add a new KeyInfo element for X509 data.
+ *
+ * @note The added element is empty. The caller must make use of the
+ * returned object to set the required values.
+ *
+ * @returns A pointer to the created object.
+ */
+
+ virtual DSIGKeyInfoX509 * appendX509Data(void) = 0;
+
+ /**
* \brief Append a KeyName element.
*
* Add a new KeyInfo element for a key name.
1.12 +11 -1 xml-security/c/src/xenc/impl/XENCEncryptedDataImpl.hpp
Index: XENCEncryptedDataImpl.hpp
===================================================================
RCS file: /home/cvs/xml-security/c/src/xenc/impl/XENCEncryptedDataImpl.hpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- XENCEncryptedDataImpl.hpp 3 Feb 2005 14:05:59 -0000 1.11
+++ XENCEncryptedDataImpl.hpp 9 May 2005 14:32:35 -0000 1.12
@@ -67,6 +67,16 @@
{return XENCEncryptedTypeImpl::getEncryptionMethod();}
virtual void clearKeyInfo(void)
{XENCEncryptedTypeImpl::clearKeyInfo();}
+ virtual DSIGKeyInfoValue * appendDSAKeyValue(const XMLCh * P,
+ const XMLCh * Q,
+ const XMLCh * G,
+ const XMLCh * Y)
+ {return XENCEncryptedTypeImpl::appendDSAKeyValue(P, Q, G, Y);}
+ virtual DSIGKeyInfoValue * appendRSAKeyValue(const XMLCh * modulus,
+ const XMLCh * exponent)
+ {return XENCEncryptedTypeImpl::appendRSAKeyValue(modulus, exponent);}
+ virtual DSIGKeyInfoX509 * appendX509Data(void)
+ {return XENCEncryptedTypeImpl::appendX509Data();}
virtual DSIGKeyInfoName * appendKeyName(const XMLCh * name, bool isDName = false)
{return XENCEncryptedTypeImpl::appendKeyName(name, isDName);}
virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * getElement(void) const
1.8 +11 -1 xml-security/c/src/xenc/impl/XENCEncryptedKeyImpl.hpp
Index: XENCEncryptedKeyImpl.hpp
===================================================================
RCS file: /home/cvs/xml-security/c/src/xenc/impl/XENCEncryptedKeyImpl.hpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- XENCEncryptedKeyImpl.hpp 3 Feb 2005 14:05:59 -0000 1.7
+++ XENCEncryptedKeyImpl.hpp 9 May 2005 14:32:35 -0000 1.8
@@ -70,6 +70,16 @@
{return XENCEncryptedTypeImpl::getEncryptionMethod();}
virtual void clearKeyInfo(void)
{XENCEncryptedTypeImpl::clearKeyInfo();}
+ virtual DSIGKeyInfoValue * appendDSAKeyValue(const XMLCh * P,
+ const XMLCh * Q,
+ const XMLCh * G,
+ const XMLCh * Y)
+ {return XENCEncryptedTypeImpl::appendDSAKeyValue(P, Q, G, Y);}
+ virtual DSIGKeyInfoValue * appendRSAKeyValue(const XMLCh * modulus,
+ const XMLCh * exponent)
+ {return XENCEncryptedTypeImpl::appendRSAKeyValue(modulus, exponent);}
+ virtual DSIGKeyInfoX509 * appendX509Data(void)
+ {return XENCEncryptedTypeImpl::appendX509Data();}
virtual DSIGKeyInfoName * appendKeyName(const XMLCh * name, bool isDName = false)
{return XENCEncryptedTypeImpl::appendKeyName(name, isDName);}
virtual XERCES_CPP_NAMESPACE_QUALIFIER DOMElement * getElement(void) const
1.19 +26 -1 xml-security/c/src/xenc/impl/XENCEncryptedTypeImpl.cpp
Index: XENCEncryptedTypeImpl.cpp
===================================================================
RCS file: /home/cvs/xml-security/c/src/xenc/impl/XENCEncryptedTypeImpl.cpp,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- XENCEncryptedTypeImpl.cpp 3 Feb 2005 14:05:59 -0000 1.18
+++ XENCEncryptedTypeImpl.cpp 9 May 2005 14:32:35 -0000 1.19
@@ -457,6 +457,31 @@
}
+DSIGKeyInfoValue * XENCEncryptedTypeImpl::appendDSAKeyValue(const XMLCh * P,
+ const XMLCh * Q,
+ const XMLCh * G,
+ const XMLCh * Y) {
+
+ createKeyInfoElement();
+ return m_keyInfoList.appendDSAKeyValue(P, Q, G, Y);
+
+}
+
+DSIGKeyInfoValue * XENCEncryptedTypeImpl::appendRSAKeyValue(const XMLCh * modulus,
+ const XMLCh * exponent) {
+
+ createKeyInfoElement();
+ return m_keyInfoList.appendRSAKeyValue(modulus, exponent);
+
+}
+
+
+DSIGKeyInfoX509 * XENCEncryptedTypeImpl::appendX509Data(void) {
+
+ createKeyInfoElement();
+ return m_keyInfoList.appendX509Data();
+
+}
DSIGKeyInfoName * XENCEncryptedTypeImpl::appendKeyName(const XMLCh * name, bool isDName) {
1.13 +43 -1 xml-security/c/src/xenc/impl/XENCEncryptedTypeImpl.hpp
Index: XENCEncryptedTypeImpl.hpp
===================================================================
RCS file: /home/cvs/xml-security/c/src/xenc/impl/XENCEncryptedTypeImpl.hpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- XENCEncryptedTypeImpl.hpp 3 Feb 2005 14:05:59 -0000 1.12
+++ XENCEncryptedTypeImpl.hpp 9 May 2005 14:32:35 -0000 1.13
@@ -70,6 +70,48 @@
virtual DSIGKeyInfoList * getKeyInfoList(void) {return &m_keyInfoList;}
virtual XENCEncryptionMethod * getEncryptionMethod(void) const;
virtual void clearKeyInfo(void);
+ /**
+ * \brief Append a DSA KeyValue element
+ *
+ * Add a new KeyInfo element for a DSA Value
+ *
+ * @param P Base64 encoded value of P
+ * @param Q Base64 encoded value of Q
+ * @param G Base64 encoded value of G
+ * @param Y Base64 encoded value of Y
+ * @returns A pointer to the created object.
+ */
+
+ virtual DSIGKeyInfoValue * appendDSAKeyValue(const XMLCh * P,
+ const XMLCh * Q,
+ const XMLCh * G,
+ const XMLCh * Y);
+
+ /**
+ * \brief Append a RSA KeyValue element
+ *
+ * Add a new KeyInfo element for a RSA Value
+ *
+ * @param modulus Base64 encoded value of the modulus
+ * @param exponent Base64 encoded value of exponent
+ * @returns A pointer to the created object.
+ */
+
+ virtual DSIGKeyInfoValue * appendRSAKeyValue(const XMLCh * modulus,
+ const XMLCh * exponent);
+
+ /**
+ * \brief Append a X509Data element.
+ *
+ * Add a new KeyInfo element for X509 data.
+ *
+ * @note The added element is empty. The caller must make use of the
+ * returned object to set the required values.
+ *
+ * @returns A pointer to the created object.
+ */
+
+ virtual DSIGKeyInfoX509 * appendX509Data(void);
virtual DSIGKeyInfoName * appendKeyName(const XMLCh * name, bool isDName = false);
virtual void appendEncryptedKey(XENCEncryptedKey * encryptedKey);