From 49b1179582c4d42bdd42feaede714e53f24b0cc0 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Thu, 27 Jul 2017 00:04:44 +0200 Subject: Hide Tools -> Generate CA behind HAVE_SSL --- src/monitor-gui.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/monitor-gui.cc b/src/monitor-gui.cc index 409fac0..29c856f 100644 --- a/src/monitor-gui.cc +++ b/src/monitor-gui.cc @@ -44,7 +44,9 @@ std::string const ACTION_COPY_RAW = "copy_raw"; std::string const ACTION_COPY_TEXT = "copy_text"; std::string const ACTION_CLEAR = "clear"; std::string const ACTION_PROXY_LOG = "proxy_log"; +#if HAVE_SSL std::string const ACTION_GENERATE_CA = "genca"; +#endif // HAVE_SSL bool valid_hostname(std::string const& host) { return !host.empty(); @@ -531,6 +533,7 @@ private: Resolver* resolver_; }; +#if HAVE_SSL class GenerateFormListener : public GuiFormApply::Listener { public: void changed(GuiForm* UNUSED(form), std::string const& UNUSED(id)) override { @@ -622,6 +625,7 @@ private: Config* config_; std::unique_ptr logger_; }; +#endif // HAVE_SSL public: MonitorGui() @@ -643,8 +647,10 @@ public: edit->add_item(ACTION_COPY_RAW, "Copy binary"); edit->add_separator(); edit->add_item(ACTION_CLEAR, "Clear"); +#if HAVE_SSL auto tools = menu_->add_menu("Tools"); tools->add_item(ACTION_GENERATE_CA, "Generate CA..."); +#endif // HAVE_SSL auto help = menu_->add_menu("Help"); help->add_item(ACTION_ABOUT, "About..."); help->add_item(ACTION_PROXY_LOG, "Proxy log..."); @@ -801,6 +807,7 @@ public: } else { proxy_logwnd_->focus(); } +#if HAVE_SSL } else if (id == ACTION_GENERATE_CA) { auto del = std::unique_ptr( new GenerateFormDelegate(looper_.get(), main_->config())); @@ -824,6 +831,7 @@ public: GuiForm::FILE_SAVE, filter); dlg->add_listener(lst.get()); dlg->show(main_.get()); +#endif // HAVE_SSL } else { assert(false); } -- cgit v1.2.3-70-g09d2