summaryrefslogtreecommitdiff
path: root/noncore/settings/sshkeys/sshkeys.cpp
authordwmw2 <dwmw2>2002-09-19 20:44:40 (UTC)
committer dwmw2 <dwmw2>2002-09-19 20:44:40 (UTC)
commitf4162d2283ebf0327645e0ac66b539cf87565d0b (patch) (unidiff)
treee15f52a57ad9af4ab9581d63a35cee05510742c9 /noncore/settings/sshkeys/sshkeys.cpp
parent9c39f0983a3b8d280ee651d578593ed2196f2607 (diff)
downloadopie-f4162d2283ebf0327645e0ac66b539cf87565d0b.zip
opie-f4162d2283ebf0327645e0ac66b539cf87565d0b.tar.gz
opie-f4162d2283ebf0327645e0ac66b539cf87565d0b.tar.bz2
Initial import of half-finished ssh-agent key management tool.
Diffstat (limited to 'noncore/settings/sshkeys/sshkeys.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sshkeys/sshkeys.cpp58
1 files changed, 58 insertions, 0 deletions
diff --git a/noncore/settings/sshkeys/sshkeys.cpp b/noncore/settings/sshkeys/sshkeys.cpp
new file mode 100644
index 0000000..08ce18d
--- a/dev/null
+++ b/noncore/settings/sshkeys/sshkeys.cpp
@@ -0,0 +1,58 @@
1#include "sshkeys.h"
2
3#include <qpe/qpeapplication.h>
4#include <opie/oprocess.h>
5#include <qmultilineedit.h>
6#include <qpushbutton.h>
7#include <qtable.h>
8
9SSHKeysApp::SSHKeysApp( QWidget* parent, const char* name, WFlags fl )
10 : SSHKeysBase( parent, name, fl )
11{
12
13 connect(AddButton, SIGNAL(clicked()), this, SLOT(doAddButton()));
14 connect(RefreshListButton, SIGNAL(clicked()), this, SLOT(doRefreshListButton()));
15 connect(RemoveAllButton, SIGNAL(clicked()), this, SLOT(doRemoveAllButton()));
16
17 KeyList->horizontalHeader()->setLabel(0, tr("Key"));
18 KeyList->horizontalHeader()->setLabel(1, tr("Size"));
19 KeyList->horizontalHeader()->setLabel(2, tr("Fingerprint"));
20
21 doRefreshListButton();
22}
23
24SSHKeysApp::~SSHKeysApp()
25{
26}
27
28void SSHKeysApp::doRefreshListButton()
29{
30 OProcess sshadd_process;
31
32 connect(&sshadd_process, SIGNAL(receivedStdout(OProcess*,char*,int)),
33 this, SLOT(get_list_keys_output(OProcess*,char*,int)));
34
35 TextOutput->append("Running ssh-add -l\n");
36 sshadd_process << "ssh-add" << "-l";
37 bool ret = sshadd_process.start(OProcess::Block, OProcess::AllOutput);
38 if (!ret)
39 TextOutput->append("Error running ssh-add\n");
40 KeyList->setText(0, 0, "dwmw2@infradead.org (RSA v1)");
41 KeyList->setText(0, 1, "1024");
42 KeyList->setText(0, 2, "78:24:04:95:40:fc:b2:80:9b:94:d5:ae:19:56:19:65");
43}
44
45void SSHKeysApp::get_list_keys_output(OProcess *proc, char *buffer, int buflen)
46{
47 TextOutput->append(buffer);
48}
49
50
51void SSHKeysApp::doAddButton()
52{
53
54}
55void SSHKeysApp::doRemoveAllButton()
56{
57
58}