mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-06 21:58:57 -04:00
add workaround for i2p/libsam3#15
This commit is contained in:
parent
59fa96eb5f
commit
9c71177d3b
1 changed files with 8 additions and 0 deletions
|
@ -616,9 +616,17 @@ bool p3I2pSam3::generateKey(std::string &pub, std::string &priv)
|
||||||
RS_DBG("got error: ", ss.error);
|
RS_DBG("got error: ", ss.error);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub = std::string(ss.pubkey);
|
pub = std::string(ss.pubkey);
|
||||||
priv = std::string(ss.privkey);
|
priv = std::string(ss.privkey);
|
||||||
|
|
||||||
|
// sanity check
|
||||||
|
auto p = i2p::publicKeyFromPrivate(priv);
|
||||||
|
if (p != pub) {
|
||||||
|
RS_WARN("public key does not match private key! fixing ...");
|
||||||
|
pub = p;
|
||||||
|
}
|
||||||
|
|
||||||
RS_DBG2("publuc key / address ", pub);
|
RS_DBG2("publuc key / address ", pub);
|
||||||
RS_DBG2("private key ", priv);
|
RS_DBG2("private key ", priv);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue