diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/monitor-gui.cc | 8 |
1 files changed, 8 insertions, 0 deletions
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<StringLogger> 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<GuiFormApply::Delegate>( 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); } |
