mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 06:35:08 -04:00
- implemented DH protocol for PFS encryption in distant chat between GXS ids.
- changed format of keyId in rstlvkeys.{h,cc}, but kept the serialisation for backward compatibility (A #define needs to be removed to fix it for good). Updated rsrecogn, rsmsgitems, gxssecurity accordingly - added "chat peer" in IdDialog to help testing distant chat. Distant chat works and is now encrypted. The GUI still needs some smoothing: display of correct peer names in chat window, remove the need to add a message in p3chatservice.cc:3217 to force poping up the chat window. - added MsgAddress class to handle generic address types while keeping type separation in Messages. Not used yet. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7403 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
114352c0d6
commit
80f4401e88
21 changed files with 720 additions and 182 deletions
|
@ -85,7 +85,7 @@ EVP_PKEY *RsRecogn::loadMasterKey()
|
|||
}
|
||||
|
||||
|
||||
bool RsRecogn::loadSigningKeys(std::map<std::string, RsGxsRecognSignerItem *> &signMap)
|
||||
bool RsRecogn::loadSigningKeys(std::map<RsGxsId, RsGxsRecognSignerItem *> &signMap)
|
||||
{
|
||||
|
||||
EVP_PKEY *signKey = loadMasterKey();
|
||||
|
@ -176,7 +176,7 @@ bool RsRecogn::loadSigningKeys(std::map<std::string, RsGxsRecognSignerItem *> &s
|
|||
std::cerr << "RsRecogn::loadSigningKeys() signature ok";
|
||||
std::cerr << std::endl;
|
||||
#endif // DEBUG_RECOGN
|
||||
std::string signerId = item->key.keyId;
|
||||
RsGxsId signerId = item->key.keyId;
|
||||
signMap[signerId] = item;
|
||||
}
|
||||
}
|
||||
|
@ -367,7 +367,7 @@ bool RsRecogn::signTag(EVP_PKEY *signKey, RsGxsRecognTagItem *item)
|
|||
|
||||
/* save signature */
|
||||
item->sign.signData.setBinData(sigbuf, siglen);
|
||||
item->sign.keyId = signId;
|
||||
item->sign.keyId = RsGxsId(signId);
|
||||
|
||||
/* clean up */
|
||||
EVP_MD_CTX_destroy(mdctx);
|
||||
|
@ -422,7 +422,7 @@ bool RsRecogn::signSigner(EVP_PKEY *signKey, RsGxsRecognSignerItem *item)
|
|||
|
||||
/* save signature */
|
||||
item->sign.signData.setBinData(sigbuf, siglen);
|
||||
item->sign.keyId = signId;
|
||||
item->sign.keyId = RsGxsId(signId);
|
||||
|
||||
/* clean up */
|
||||
EVP_MD_CTX_destroy(mdctx);
|
||||
|
@ -472,7 +472,7 @@ bool RsRecogn::signTagRequest(EVP_PKEY *signKey, RsGxsRecognReqItem *item)
|
|||
|
||||
/* save signature */
|
||||
item->sign.signData.setBinData(sigbuf, siglen);
|
||||
item->sign.keyId = signId;
|
||||
item->sign.keyId = RsGxsId(signId);
|
||||
|
||||
/* clean up */
|
||||
EVP_MD_CTX_destroy(mdctx);
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
namespace RsRecogn {
|
||||
|
||||
EVP_PKEY * loadMasterKey();
|
||||
bool loadSigningKeys(std::map<std::string, RsGxsRecognSignerItem *> &signMap);
|
||||
bool loadSigningKeys(std::map<RsGxsId, RsGxsRecognSignerItem *> &signMap);
|
||||
bool validateTagSignature(RsGxsRecognSignerItem *signer, RsGxsRecognTagItem *item);
|
||||
|
||||
bool signTag(EVP_PKEY *signKey, RsGxsRecognTagItem *item);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue