summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2018-05-17 00:02:54 +0800
committerIru Cai <mytbk920423@gmail.com>2018-05-21 09:18:06 +0800
commitaa6575788302729a321c9a14816dd267fbcb0899 (patch)
treead7b1fd1e05b828edadb80bfcc877fc8c90e9bbb
parent0e51443aed981f82dc7c07466b7be64c167e26b0 (diff)
downloadfqterm-aa6575788302729a321c9a14816dd267fbcb0899.tar.xz
kill unneeded signals and slots
-rw-r--r--src/protocol/fqterm_ssh_socket.cpp5
-rw-r--r--src/protocol/internal/fqterm_ssh_kex.cpp3
-rw-r--r--src/protocol/internal/fqterm_ssh_kex.h3
-rw-r--r--src/protocol/internal/fqterm_ssh_packet.h14
4 files changed, 6 insertions, 19 deletions
diff --git a/src/protocol/fqterm_ssh_socket.cpp b/src/protocol/fqterm_ssh_socket.cpp
index 9c00cec..c0b8099 100644
--- a/src/protocol/fqterm_ssh_socket.cpp
+++ b/src/protocol/fqterm_ssh_socket.cpp
@@ -112,8 +112,6 @@ void FQTermSSHSocket::init(int ssh_version) {
FQ_VERIFY(connect(key_exchanger_, SIGNAL(kexError(QString)), this, SLOT(handleError(QString))));
FQ_VERIFY(connect(key_exchanger_, SIGNAL(reKex()), packet_receiver_, SLOT(resetEncryption())));
FQ_VERIFY(connect(key_exchanger_, SIGNAL(reKex()), packet_sender_, SLOT(resetEncryption())));
- FQ_VERIFY(connect(key_exchanger_, SIGNAL(startEncryption(const u_char*)), packet_receiver_, SLOT(startEncryption(const u_char*))));
- FQ_VERIFY(connect(key_exchanger_, SIGNAL(startEncryption(const u_char*)), packet_sender_, SLOT(startEncryption(const u_char*))));
FQ_VERIFY(connect(authentication_, SIGNAL(requestUserPwd(QString *, QString *, bool *)), this, SIGNAL(requestUserPwd(QString *, QString *, bool *))));
FQ_VERIFY(connect(authentication_, SIGNAL(authOK()), this, SLOT(authOK())));
@@ -140,9 +138,6 @@ void FQTermSSHSocket::init(int ssh_version) {
FQ_VERIFY(connect(key_exchanger_, SIGNAL(reKex()), packet_receiver_, SLOT(resetEncryption())));
FQ_VERIFY(connect(key_exchanger_, SIGNAL(reKex()), packet_sender_, SLOT(resetEncryption())));
- FQ_VERIFY(connect(key_exchanger_, SIGNAL(startEncryption(const u_char*)), packet_receiver_, SLOT(startEncryption(const u_char*))));
- FQ_VERIFY(connect(key_exchanger_, SIGNAL(startEncryption(const u_char*)), packet_sender_, SLOT(startEncryption(const u_char*))));
-
FQ_VERIFY(connect(authentication_, SIGNAL(requestUserPwd(QString *, QString *, bool *)), this, SIGNAL(requestUserPwd(QString *, QString *, bool *))));
FQ_VERIFY(connect(authentication_, SIGNAL(authOK()), this, SLOT(authOK())));
FQ_VERIFY(connect(authentication_, SIGNAL(authError(QString)), this, SLOT(handleError(QString))));
diff --git a/src/protocol/internal/fqterm_ssh_kex.cpp b/src/protocol/internal/fqterm_ssh_kex.cpp
index d46ba76..32db7d0 100644
--- a/src/protocol/internal/fqterm_ssh_kex.cpp
+++ b/src/protocol/internal/fqterm_ssh_kex.cpp
@@ -186,7 +186,8 @@ void FQTermSSH1Kex::makeSessionKey() {
packet_sender_->putInt(1);
packet_sender_->write();
- emit startEncryption(session_key_);
+ packet_sender_->startEncryption(session_key_, NULL);
+ packet_receiver_->startEncryption(session_key_, NULL);
}
void FQTermSSH1Kex::makeSessionId() {
diff --git a/src/protocol/internal/fqterm_ssh_kex.h b/src/protocol/internal/fqterm_ssh_kex.h
index 2bd46b8..bb668a6 100644
--- a/src/protocol/internal/fqterm_ssh_kex.h
+++ b/src/protocol/internal/fqterm_ssh_kex.h
@@ -61,9 +61,6 @@ signals:
void kexOK();
void reKex();
void kexError(QString);
-
- void startEncryption(const u_char *sessionkey);
-
};
class FQTermSSH1Kex: public FQTermSSHKex {
diff --git a/src/protocol/internal/fqterm_ssh_packet.h b/src/protocol/internal/fqterm_ssh_packet.h
index 806918e..bb6adf5 100644
--- a/src/protocol/internal/fqterm_ssh_packet.h
+++ b/src/protocol/internal/fqterm_ssh_packet.h
@@ -57,14 +57,11 @@ class FQTermSSHPacketSender: public QObject {
virtual int getKeySize() const { return cipher->keySize;}
int getMacKeySize() const { return mac->keySize;}
- public slots:
void startEncryption(const u_char *key, const u_char *IV = NULL);
- void resetEncryption();
-
void startMac(const u_char *sessionkey);
void resetMac();
-
- void enableCompress(int enable) {is_compressed_ = enable;};
+ public slots:
+ void resetEncryption();
signals:
void dataToWrite();
@@ -109,14 +106,11 @@ class FQTermSSHPacketReceiver: public QObject {
int getMacKeySize() const { return mac->keySize;}
virtual void parseData(buffer *input) = 0;
- public slots:
void startEncryption(const u_char *key, const u_char *IV = NULL);
- void resetEncryption();
-
void startMac(const u_char *sessionkey);
void resetMac();
-
- void enableCompress(int enable) {is_compressed_ = enable;};
+ public slots:
+ void resetEncryption();
signals:
void packetAvaliable(int type);