added get_data() method
This commit is contained in:
@@ -610,6 +610,14 @@ failed:
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Implements pkcs7_t.get_data
|
||||||
|
*/
|
||||||
|
static chunk_t get_data(private_pkcs7_t *this)
|
||||||
|
{
|
||||||
|
return this->data;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implements pkcs7_t.destroy
|
* 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_data = (bool (*) (pkcs7_t*))parse_data;
|
||||||
this->public.parse_signedData = (bool (*) (pkcs7_t*,x509_t*))parse_signedData;
|
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.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;
|
this->public.destroy = (void (*) (pkcs7_t*))destroy;
|
||||||
|
|
||||||
if (!parse_contentInfo(chunk, level, this))
|
if (!parse_contentInfo(chunk, level, this))
|
||||||
|
|||||||
@@ -96,9 +96,17 @@ struct pkcs7_t {
|
|||||||
*/
|
*/
|
||||||
bool (*parse_envelopedData) (pkcs7_t *this, chunk_t serialNumber, rsa_private_key_t *key);
|
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.
|
* @brief Destroys the contentInfo object.
|
||||||
*
|
*
|
||||||
* @param this PKCS#7 contentInfo object to destroy
|
* @param this PKCS#7 contentInfo object to destroy
|
||||||
*/
|
*/
|
||||||
void (*destroy) (pkcs7_t *this);
|
void (*destroy) (pkcs7_t *this);
|
||||||
|
|||||||
Reference in New Issue
Block a user