# # # patch "app_state.hh" # from [94ec00bb1b5576a83ae304e65abcb51dd9eb6b57] # to [3d931fb6e471179233467cb29c86b4e0feccf7a5] # # patch "keys.cc" # from [3d41f447c61f1d19eded21724749f4cd0017ef20] # to [69637d934cd5ec60d4ecc4a6cd178df53d3459e9] # ============================================================ --- app_state.hh 94ec00bb1b5576a83ae304e65abcb51dd9eb6b57 +++ app_state.hh 3d931fb6e471179233467cb29c86b4e0feccf7a5 @@ -27,6 +27,7 @@ class lua_hooks; #include "project.hh" #include "vocab.hh" #include "work.hh" +#include "ssh_agent.hh" namespace Botan { @@ -49,6 +50,7 @@ public: lua_hooks lua; key_store keys; workspace work; + ssh_agent agent; options opts; ============================================================ --- keys.cc 3d41f447c61f1d19eded21724749f4cd0017ef20 +++ keys.cc 69637d934cd5ec60d4ecc4a6cd178df53d3459e9 @@ -365,8 +365,7 @@ make_signature(app_state & app, //sign with ssh-agent (if connected) if (app.opts.ssh_sign == "yes" || app.opts.ssh_sign == "check") { - scoped_ptr a(new ssh_agent()); - vector ssh_keys = a->get_keys(); + vector ssh_keys = app.agent.get_keys(); if (ssh_keys.size() <= 0) L(FL("make_signature: no rsa keys received from ssh-agent")); else { @@ -390,7 +389,7 @@ make_signature(app_state & app, if ((*pub_key).get_e() == (*si).get_e() && (*pub_key).get_n() == (*si).get_n()) { L(FL("make_signature: ssh key matches monotone key, signing with ssh-agent")); - a->sign_data(*si, tosign, sig_string); + app.agent.sign_data(*si, tosign, sig_string); break; } }