mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 14:16:16 -04:00
GxsMail: Implemented RSA mail receiving
RsGxsMailBaseItem::deserialize(...) fix offset calculation RsGxsMailItem::serialize(...) fix offset calculation RsGxsMailBaseItem initialize cryptoType to UNDEFINED_ENCRYPTION p3IdService::decryptData(...) implemented multi id variant RsGixs::*cryptData(...) proper param order p3IdService::*cryptData(...) proper param order
This commit is contained in:
parent
54a0f87369
commit
1f1f4ded02
8 changed files with 260 additions and 45 deletions
|
@ -1892,7 +1892,9 @@ bool p3GRouter::encryptDataItem(RsGRouterGenericDataItem *item,const RsGxsId& de
|
|||
uint32_t encrypted_size =0;
|
||||
uint32_t error_status ;
|
||||
|
||||
if(!mGixs->encryptData(item->data_bytes,item->data_size,encrypted_data,encrypted_size,destination_key,true,error_status))
|
||||
if(!mGixs->encryptData( item->data_bytes, item->data_size, encrypted_data,
|
||||
encrypted_size, destination_key, error_status,
|
||||
true ))
|
||||
{
|
||||
std::cerr << "(EE) Cannot encrypt: " ;
|
||||
if(error_status == RsGixs::RS_GIXS_ERROR_KEY_NOT_AVAILABLE) std::cerr << " key not available for ID = " << destination_key << std::endl;
|
||||
|
@ -1926,7 +1928,9 @@ bool p3GRouter::decryptDataItem(RsGRouterGenericDataItem *item)
|
|||
uint32_t decrypted_size =0;
|
||||
uint32_t error_status ;
|
||||
|
||||
if(!mGixs->decryptData(item->data_bytes,item->data_size,decrypted_data,decrypted_size,item->destination_key,error_status))
|
||||
if(!mGixs->decryptData( item->data_bytes, item->data_size, decrypted_data,
|
||||
decrypted_size, item->destination_key, error_status,
|
||||
true ))
|
||||
{
|
||||
if(error_status == RsGixs::RS_GIXS_ERROR_KEY_NOT_AVAILABLE)
|
||||
std::cerr << "(EE) Cannot decrypt incoming message. Key " << item->destination_key << " unknown." << std::endl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue