From 9dca0dddf84a6d6069e1f85c8b9ee1c6b6dd5095 Mon Sep 17 00:00:00 2001 From: acetone <63557806+acetoneRu@users.noreply.github.com> Date: Mon, 17 May 2021 01:33:41 -0400 Subject: [PATCH] user friendly mode --- offlinekeys.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/offlinekeys.cpp b/offlinekeys.cpp index 68331ae..473c703 100644 --- a/offlinekeys.cpp +++ b/offlinekeys.cpp @@ -42,6 +42,7 @@ int main (int argc, char * argv[]) { std::string str(argv[3]); type = NameToSigType(str); + if (SigTypeToName(type).find("unknown") != std::string::npos) { std::cerr << "Incorrect signature type" << std::endl; return -2; } } int days = 365; // 1 year by default @@ -58,7 +59,9 @@ int main (int argc, char * argv[]) len = offlineKeys.ToBuffer (buf, len); f.write ((char *)buf, len); delete[] buf; - std::cout << "Offline keys for destination " << offlineKeys.GetPublic ()->GetIdentHash ().ToBase32 () << " created" << std::endl; + std::cout << "Offline keys for destination " << offlineKeys.GetPublic ()->GetIdentHash ().ToBase32 () << " created" << std::endl + << "Signature type: " << SigTypeToName(type) << " (" << type << ")" << std::endl + << "Days: " << days << std::endl; } else std::cout << "Can't create file " << argv[1] << std::endl; @@ -67,4 +70,3 @@ int main (int argc, char * argv[]) return 0; } -