mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-05-05 06:57:00 +02:00
fixed private key size and publishing for crypto type 1
This commit is contained in:
parent
d9f64c6f51
commit
855e111bd0
2 changed files with 3 additions and 16 deletions
|
@ -165,7 +165,7 @@ namespace crypto
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case i2p::data::CRYPTO_KEY_TYPE_ELGAMAL: return 256;
|
case i2p::data::CRYPTO_KEY_TYPE_ELGAMAL: return 256;
|
||||||
case i2p::data::CRYPTO_KEY_TYPE_ECIES_P256_SHA256_AES256CBC: return 32;
|
case i2p::data::CRYPTO_KEY_TYPE_ECIES_P256_SHA256_AES256CBC: return 256; // actual size is 32, but we use 256 for compatibility with old keys files
|
||||||
case i2p::data::CRYPTO_KEY_TYPE_ECIES_X25519_AEAD: return 32;
|
case i2p::data::CRYPTO_KEY_TYPE_ECIES_X25519_AEAD: return 32;
|
||||||
// ML-KEM hybrid
|
// ML-KEM hybrid
|
||||||
case i2p::data::CRYPTO_KEY_TYPE_ECIES_MLKEM512_X25519_AEAD:
|
case i2p::data::CRYPTO_KEY_TYPE_ECIES_MLKEM512_X25519_AEAD:
|
||||||
|
|
|
@ -728,22 +728,9 @@ namespace client
|
||||||
{
|
{
|
||||||
if (m_PublishReplyToken)
|
if (m_PublishReplyToken)
|
||||||
{
|
{
|
||||||
|
LogPrint (eLogWarning, "Destination: Publish confirmation was not received in ", PUBLISH_CONFIRMATION_TIMEOUT, " milliseconds or failed. will try again");
|
||||||
m_PublishReplyToken = 0;
|
m_PublishReplyToken = 0;
|
||||||
if (GetIdentity ()->GetCryptoKeyType () == i2p::data::CRYPTO_KEY_TYPE_ELGAMAL)
|
Publish ();
|
||||||
{
|
|
||||||
LogPrint (eLogWarning, "Destination: Publish confirmation was not received in ", PUBLISH_CONFIRMATION_TIMEOUT, " milliseconds or failed. will try again");
|
|
||||||
Publish ();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
LogPrint (eLogWarning, "Destination: Publish confirmation was not received in ", PUBLISH_CONFIRMATION_TIMEOUT, " milliseconds from Java floodfill for crypto type ", (int)GetIdentity ()->GetCryptoKeyType ());
|
|
||||||
// Java floodfill never sends confirmation back for unknown crypto type
|
|
||||||
// assume it successive and try to verify
|
|
||||||
m_PublishVerificationTimer.expires_from_now (boost::posix_time::seconds(PUBLISH_VERIFICATION_TIMEOUT + PUBLISH_VERIFICATION_TIMEOUT_VARIANCE)); // always max
|
|
||||||
m_PublishVerificationTimer.async_wait (std::bind (&LeaseSetDestination::HandlePublishVerificationTimer,
|
|
||||||
shared_from_this (), std::placeholders::_1));
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue