{"action":"closed","issue":{"url":"https://api.github.com/repos/randombit/botan/issues/354","repository_url":"https://api.github.com/repos/randombit/botan","labels_url":"https://api.github.com/repos/randombit/botan/issues/354/labels{/name}","comments_url":"https://api.github.com/repos/randombit/botan/issues/354/comments","events_url":"https://api.github.com/repos/randombit/botan/issues/354/events","html_url":"https://github.com/randombit/botan/issues/354","id":121594590,"number":354,"title":"cli: regression error (demanding wrong number of arguments)","user":{"login":"mouse07410","id":5923577,"avatar_url":"https://avatars.githubusercontent.com/u/5923577?v=3","gravatar_id":"","url":"https://api.github.com/users/mouse07410","html_url":"https://github.com/mouse07410","followers_url":"https://api.github.com/users/mouse07410/followers","following_url":"https://api.github.com/users/mouse07410/following{/other_user}","gists_url":"https://api.github.com/users/mouse07410/gists{/gist_id}","starred_url":"https://api.github.com/users/mouse07410/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mouse07410/subscriptions","organizations_url":"https://api.github.com/users/mouse07410/orgs","repos_url":"https://api.github.com/users/mouse07410/repos","events_url":"https://api.github.com/users/mouse07410/events{/privacy}","received_events_url":"https://api.github.com/users/mouse07410/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-12-10T22:42:25Z","updated_at":"2016-02-12T17:32:25Z","closed_at":"2016-02-12T17:32:25Z","body":"`src/cli/x509print.cpp` has the following code:\r\n```\r\nint x509print(const std::vector<std::string> &args)\r\n   {\r\n   if(args.size() != 1)\r\n      {\r\n      std::cout << \"Usage: \" << args[0] << \" cert.pem\" << std::endl;\r\n      return 1;\r\n      }\r\n```\r\nThe comparison should be `args.size() <= 1`, or `args.size() != 2`.\r\n\r\n\r\n`src/cli/cert_verify.cpp` has a similar problem:\r\n```\r\nint cert_verify(const std::vector<std::string> &args)\r\n   {\r\n   using namespace Botan;\r\n\r\n   if(args.size() <= 2)\r\n      {\r\n      std::cout << \"Usage: \" << args[0] << \" subject.pem [CA certificates...]\" << std::endl;\r\n      return 1;\r\n      }\r\n```\r\n\r\nComparison should be `args.size() < 2`.\r\n\r\nHaven't checked all of them, so may be other lurkers.\r\n"}}