mirror of
https://github.com/PurpleI2P/i2pd
synced 2024-11-10 00:00:29 +03:00
CRYPTO_TYPE for DEST GENERATE
This commit is contained in:
parent
272090fc8f
commit
a1e820182c
@ -489,11 +489,15 @@ namespace client
|
||||
ExtractParams (buf, params);
|
||||
// extract signature type
|
||||
i2p::data::SigningKeyType signatureType = i2p::data::SIGNING_KEY_TYPE_DSA_SHA1;
|
||||
i2p::data::CryptoKeyType cryptoType = i2p::data::CRYPTO_KEY_TYPE_ELGAMAL;
|
||||
auto it = params.find (SAM_PARAM_SIGNATURE_TYPE);
|
||||
if (it != params.end ())
|
||||
// TODO: extract string values
|
||||
signatureType = std::stoi(it->second);
|
||||
auto keys = i2p::data::PrivateKeys::CreateRandomKeys (signatureType);
|
||||
it = params.find (SAM_PARAM_CRYPTO_TYPE);
|
||||
if (it != params.end ())
|
||||
cryptoType = std::stoi(it->second);
|
||||
auto keys = i2p::data::PrivateKeys::CreateRandomKeys (signatureType, cryptoType);
|
||||
#ifdef _MSC_VER
|
||||
size_t l = sprintf_s (m_Buffer, SAM_SOCKET_BUFFER_SIZE, SAM_DEST_REPLY,
|
||||
keys.GetPublic ()->ToBase64 ().c_str (), keys.ToBase64 ().c_str ());
|
||||
|
Loading…
Reference in New Issue
Block a user