fix keyinfo on latest gcc, update Makefile

Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
R4SAS 2023-03-11 21:32:14 +00:00
parent aadc780b44
commit f9348979a2
No known key found for this signature in database
GPG key ID: 66F6C87B98EBCFE2
4 changed files with 67 additions and 55 deletions

View file

@ -16,6 +16,7 @@ int main (int argc, char * argv[])
i2p::data::PrivateKeys keys;
std::ifstream s(argv[1], std::ifstream::binary);
if (s.is_open ())
{
s.seekg (0, std::ios::end);
@ -23,6 +24,7 @@ int main (int argc, char * argv[])
s.seekg (0, std::ios::beg);
uint8_t * buf = new uint8_t[len];
s.read ((char *)buf, len);
if(keys.FromBuffer (buf, len))
{
auto signatureLen = keys.GetPublic ()->GetSignatureLen ();
@ -41,10 +43,10 @@ int main (int argc, char * argv[])
}
else
std::cout << "Failed to load keyfile " << argv[1] << std::endl;
delete[] buf;
}
i2p::crypto::TerminateCrypto ();
return 0;
}