mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-31 10:19:24 -04:00
separated RsTlvSecurityKey into two incompatible classes to enforce the correct usage of private vs. public keys
This commit is contained in:
parent
cbef01451c
commit
590be092e5
26 changed files with 600 additions and 351 deletions
|
@ -890,7 +890,7 @@ void p3GxsTunnelService::handleRecvDHPublicKey(RsGxsTunnelDHPublicKeyItem *item)
|
|||
RsTemporaryMemory data(pubkey_size) ;
|
||||
BN_bn2bin(item->public_key, data) ;
|
||||
|
||||
RsTlvSecurityKey signature_key ;
|
||||
RsTlvPublicRSAKey signature_key ;
|
||||
|
||||
// We need to get the key of the sender, but if the key is not cached, we
|
||||
// need to get it first. So we let the system work for 2-3 seconds before
|
||||
|
@ -1059,9 +1059,9 @@ bool p3GxsTunnelService::locked_sendDHPublicKey(const DH *dh,const RsGxsId& own_
|
|||
|
||||
// we should also sign the data and check the signature on the other end.
|
||||
//
|
||||
RsTlvKeySignature signature ;
|
||||
RsTlvSecurityKey signature_key ;
|
||||
RsTlvSecurityKey signature_key_public ;
|
||||
RsTlvKeySignature signature ;
|
||||
RsTlvPrivateRSAKey signature_key ;
|
||||
RsTlvPublicRSAKey signature_key_public ;
|
||||
|
||||
uint32_t error_status ;
|
||||
|
||||
|
|
|
@ -146,7 +146,7 @@ class RsGxsTunnelDHPublicKeyItem: public RsGxsTunnelItem
|
|||
BIGNUM *public_key ;
|
||||
|
||||
RsTlvKeySignature signature ; // signs the public key in a row.
|
||||
RsTlvSecurityKey gxs_key ; // public key of the signer
|
||||
RsTlvPublicRSAKey gxs_key ; // public key of the signer
|
||||
|
||||
private:
|
||||
// make the object non copy-able
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue