mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
CRYPTO_TYPE for SAM destinations
This commit is contained in:
parent
7de21c1f93
commit
cfb6ddbfc6
4 changed files with 14 additions and 6 deletions
|
@ -911,14 +911,18 @@ namespace client
|
|||
{
|
||||
// extract signature type
|
||||
i2p::data::SigningKeyType signatureType = i2p::data::SIGNING_KEY_TYPE_DSA_SHA1;
|
||||
i2p::data::CryptoKeyType cryptoType = i2p::data::CRYPTO_KEY_TYPE_ELGAMAL;
|
||||
if (params)
|
||||
{
|
||||
auto it = params->find (SAM_PARAM_SIGNATURE_TYPE);
|
||||
if (it != params->end ())
|
||||
// TODO: extract string values
|
||||
signatureType = std::stoi(it->second);
|
||||
it = params->find (SAM_PARAM_CRYPTO_TYPE);
|
||||
if (it != params->end ())
|
||||
cryptoType = std::stoi(it->second);
|
||||
}
|
||||
localDestination = i2p::client::context.CreateNewLocalDestination (true, signatureType, params);
|
||||
localDestination = i2p::client::context.CreateNewLocalDestination (true, signatureType, cryptoType, params);
|
||||
}
|
||||
if (localDestination)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue