added get_data() method

This commit is contained in:
Andreas Steffen
2007-10-11 14:38:46 +00:00
parent 04685885f5
commit a09bbc82ce
2 changed files with 18 additions and 1 deletions
+9
View File
@@ -610,6 +610,14 @@ failed:
return FALSE;
}
/**
* Implements pkcs7_t.get_data
*/
static chunk_t get_data(private_pkcs7_t *this)
{
return this->data;
}
/**
* Implements pkcs7_t.destroy
*/
@@ -681,6 +689,7 @@ pkcs7_t *pkcs7_create_from_chunk(chunk_t chunk, u_int level)
this->public.parse_data = (bool (*) (pkcs7_t*))parse_data;
this->public.parse_signedData = (bool (*) (pkcs7_t*,x509_t*))parse_signedData;
this->public.parse_envelopedData = (bool (*) (pkcs7_t*,chunk_t,rsa_private_key_t*))parse_envelopedData;
this->public.get_data = (chunk_t (*) (pkcs7_t*))get_data;
this->public.destroy = (void (*) (pkcs7_t*))destroy;
if (!parse_contentInfo(chunk, level, this))
+9 -1
View File
@@ -96,9 +96,17 @@ struct pkcs7_t {
*/
bool (*parse_envelopedData) (pkcs7_t *this, chunk_t serialNumber, rsa_private_key_t *key);
/**
* @brief Returns the parsed data object
*
* @param this calling object
* @return chunk containing the data object
*/
chunk_t (*get_data) (pkcs7_t *this);
/**
* @brief Destroys the contentInfo object.
*
*
* @param this PKCS#7 contentInfo object to destroy
*/
void (*destroy) (pkcs7_t *this);