Browse Source

pass correct crypto type to identity

pull/996/head
orignal 7 years ago
parent
commit
a4ce224cd1
  1. 2
      libi2pd/Identity.cpp
  2. 2
      libi2pd_client/ClientContext.cpp

2
libi2pd/Identity.cpp

@ -657,7 +657,7 @@ namespace data
uint8_t publicKey[256]; uint8_t publicKey[256];
GenerateCryptoKeyPair (cryptoType, keys.m_PrivateKey, publicKey); GenerateCryptoKeyPair (cryptoType, keys.m_PrivateKey, publicKey);
// identity // identity
keys.m_Public = std::make_shared<IdentityEx> (publicKey, signingPublicKey, type); keys.m_Public = std::make_shared<IdentityEx> (publicKey, signingPublicKey, type, cryptoType);
keys.CreateSigner (); keys.CreateSigner ();
return keys; return keys;

2
libi2pd_client/ClientContext.cpp

@ -304,7 +304,7 @@ namespace client
} }
else else
{ {
LogPrint (eLogError, "Clients: can't open file ", fullPath, " Creating new one with signature type ", sigType); LogPrint (eLogError, "Clients: can't open file ", fullPath, " Creating new one with signature type ", sigType, " crypto type ", cryptoType);
keys = i2p::data::PrivateKeys::CreateRandomKeys (sigType, cryptoType); keys = i2p::data::PrivateKeys::CreateRandomKeys (sigType, cryptoType);
std::ofstream f (fullPath, std::ofstream::binary | std::ofstream::out); std::ofstream f (fullPath, std::ofstream::binary | std::ofstream::out);
size_t len = keys.GetFullLen (); size_t len = keys.GetFullLen ();

Loading…
Cancel
Save