mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-23 17:36:37 +02:00
don't create transit tunnel if decyrption failed
This commit is contained in:
parent
4e7aafeec1
commit
f94d03465a
1 changed files with 2 additions and 1 deletions
|
@ -361,8 +361,9 @@ namespace i2p
|
||||||
{
|
{
|
||||||
LogPrint (eLogDebug, "I2NP: Build request record ", i, " is ours");
|
LogPrint (eLogDebug, "I2NP: Build request record ", i, " is ours");
|
||||||
BN_CTX * ctx = BN_CTX_new ();
|
BN_CTX * ctx = BN_CTX_new ();
|
||||||
i2p::context.DecryptTunnelBuildRecord (record + BUILD_REQUEST_RECORD_ENCRYPTED_OFFSET, clearText, ctx);
|
bool success = i2p::context.DecryptTunnelBuildRecord (record + BUILD_REQUEST_RECORD_ENCRYPTED_OFFSET, clearText, ctx);
|
||||||
BN_CTX_free (ctx);
|
BN_CTX_free (ctx);
|
||||||
|
if(!success) return false;
|
||||||
uint8_t retCode = 0;
|
uint8_t retCode = 0;
|
||||||
bool isECIES = i2p::context.IsECIES ();
|
bool isECIES = i2p::context.IsECIES ();
|
||||||
// replace record to reply
|
// replace record to reply
|
||||||
|
|
Loading…
Add table
Reference in a new issue