mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-25 07:29:33 -05:00
add workaround for i2p/libsam3#15
This commit is contained in:
parent
59fa96eb5f
commit
9c71177d3b
@ -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…
Reference in New Issue
Block a user