diff options
author | Eike Ziller <eike.ziller@qt.io> | 2017-05-09 15:07:30 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2017-05-09 15:07:30 +0200 |
commit | 6e8ee7479e7fda2c79c50f1ffea5d7bda36f96d0 (patch) | |
tree | c62a96b84f7b6af02faa3eca7d603a8aa96944ea /src/libs/ssh | |
parent | d571e8d442e862f3e89825f5d3eb02fae94dd9ec (diff) | |
parent | 3282f85f3db743aa96e4d3410e4737284a9b566c (diff) |
Merge remote-tracking branch 'origin/4.3'
Conflicts:
src/plugins/debugger/cdb/cdbengine.cpp
Change-Id: Ib9aeccc4162c43e9ee3d85847d96678045625dd0
Diffstat (limited to 'src/libs/ssh')
-rw-r--r-- | src/libs/ssh/sshchannel.cpp | 4 | ||||
-rw-r--r-- | src/libs/ssh/sshchannelmanager.cpp | 2 | ||||
-rw-r--r-- | src/libs/ssh/sshconnection.cpp | 4 | ||||
-rw-r--r-- | src/libs/ssh/sshcryptofacility.cpp | 10 | ||||
-rw-r--r-- | src/libs/ssh/sshdirecttcpiptunnel.cpp | 2 | ||||
-rw-r--r-- | src/libs/ssh/sshforwardedtcpiptunnel.cpp | 2 | ||||
-rw-r--r-- | src/libs/ssh/sshkeycreationdialog.cpp | 2 | ||||
-rw-r--r-- | src/libs/ssh/sshkeygenerator.cpp | 2 | ||||
-rw-r--r-- | src/libs/ssh/sshremoteprocess.cpp | 2 | ||||
-rw-r--r-- | src/libs/ssh/sshtcpipforwardserver.cpp | 4 |
10 files changed, 15 insertions, 19 deletions
diff --git a/src/libs/ssh/sshchannel.cpp b/src/libs/ssh/sshchannel.cpp index f4ae59a97df..d48622b36f1 100644 --- a/src/libs/ssh/sshchannel.cpp +++ b/src/libs/ssh/sshchannel.cpp @@ -75,7 +75,7 @@ void AbstractSshChannel::requestSessionStart() m_sendFacility.sendSessionPacket(m_localChannel, initialWindowSize(), maxPacketSize()); setChannelState(SessionRequested); m_timeoutTimer.start(ReplyTimeout); - } catch (const Botan::Exception &e) { + } catch (const std::exception &e) { qCWarning(sshLog, "Botan error: %s", e.what()); closeChannel(); } @@ -86,7 +86,7 @@ void AbstractSshChannel::sendData(const QByteArray &data) try { m_sendBuffer += data; flushSendBuffer(); - } catch (const Botan::Exception &e) { + } catch (const std::exception &e) { qCWarning(sshLog, "Botan error: %s", e.what()); closeChannel(); } diff --git a/src/libs/ssh/sshchannelmanager.cpp b/src/libs/ssh/sshchannelmanager.cpp index d3e8e4dd3b2..364d1dcfe24 100644 --- a/src/libs/ssh/sshchannelmanager.cpp +++ b/src/libs/ssh/sshchannelmanager.cpp @@ -91,7 +91,7 @@ void SshChannelManager::handleChannelOpen(const SshIncomingPacket &packet) try { m_sendFacility.sendChannelOpenFailurePacket(channelOpen.remoteChannel, reason, QByteArray()); - } catch (const Botan::Exception &e) { + } catch (const std::exception &e) { qCWarning(sshLog, "Botan error: %s", e.what()); } return; diff --git a/src/libs/ssh/sshconnection.cpp b/src/libs/ssh/sshconnection.cpp index 790ea40ebc8..d6d5b5cf059 100644 --- a/src/libs/ssh/sshconnection.cpp +++ b/src/libs/ssh/sshconnection.cpp @@ -200,7 +200,7 @@ int SshConnection::closeAllChannels() { try { return d->m_channelManager->closeAllChannels(Internal::SshChannelManager::CloseAllRegular); - } catch (const Botan::Exception &e) { + } catch (const std::exception &e) { qCWarning(Internal::sshLog, "%s: %s", Q_FUNC_INFO, e.what()); return -1; } @@ -346,7 +346,7 @@ void SshConnectionPrivate::handleIncomingData() } catch (const SshClientException &e) { closeConnection(SSH_DISCONNECT_BY_APPLICATION, e.error, "", e.errorString); - } catch (const Botan::Exception &e) { + } catch (const std::exception &e) { closeConnection(SSH_DISCONNECT_BY_APPLICATION, SshInternalError, "", tr("Botan library exception: %1").arg(QString::fromLatin1(e.what()))); } diff --git a/src/libs/ssh/sshcryptofacility.cpp b/src/libs/ssh/sshcryptofacility.cpp index bfd853be42b..7156fd801ad 100644 --- a/src/libs/ssh/sshcryptofacility.cpp +++ b/src/libs/ssh/sshcryptofacility.cpp @@ -272,10 +272,7 @@ bool SshEncryptionFacility::createAuthenticationKeyFromPKCS8(const QByteArray &p Q_FUNC_INFO); return false; } - } catch (const Exception &ex) { - error = QLatin1String(ex.what()); - return false; - } catch (const Decoding_Error &ex) { + } catch (const std::exception &ex) { error = QLatin1String(ex.what()); return false; } @@ -360,10 +357,7 @@ bool SshEncryptionFacility::createAuthenticationKeyFromOpenSSL(const QByteArray sequence.discard_remaining(); sequence.verify_end(); - } catch (const Exception &ex) { - error = QLatin1String(ex.what()); - return false; - } catch (const Decoding_Error &ex) { + } catch (const std::exception &ex) { error = QLatin1String(ex.what()); return false; } diff --git a/src/libs/ssh/sshdirecttcpiptunnel.cpp b/src/libs/ssh/sshdirecttcpiptunnel.cpp index e3b21531a27..9700bd99c66 100644 --- a/src/libs/ssh/sshdirecttcpiptunnel.cpp +++ b/src/libs/ssh/sshdirecttcpiptunnel.cpp @@ -103,7 +103,7 @@ void SshDirectTcpIpTunnel::initialize() d->m_originatingHost.toUtf8(), d->m_originatingPort); d->setChannelState(AbstractSshChannel::SessionRequested); d->m_timeoutTimer.start(d->ReplyTimeout); - } catch (const Botan::Exception &e) { // Won't happen, but let's play it safe. + } catch (const std::exception &e) { // Won't happen, but let's play it safe. qCWarning(sshLog, "Botan error: %s", e.what()); d->closeChannel(); } diff --git a/src/libs/ssh/sshforwardedtcpiptunnel.cpp b/src/libs/ssh/sshforwardedtcpiptunnel.cpp index 0175dd03138..22442f7c80c 100644 --- a/src/libs/ssh/sshforwardedtcpiptunnel.cpp +++ b/src/libs/ssh/sshforwardedtcpiptunnel.cpp @@ -45,7 +45,7 @@ void SshForwardedTcpIpTunnelPrivate::handleOpenSuccessInternal() try { m_sendFacility.sendChannelOpenConfirmationPacket(remoteChannel(), localChannelId(), initialWindowSize(), maxPacketSize()); - } catch (const Botan::Exception &e) { // Won't happen, but let's play it safe. + } catch (const std::exception &e) { // Won't happen, but let's play it safe. qCWarning(sshLog, "Botan error: %s", e.what()); closeChannel(); } diff --git a/src/libs/ssh/sshkeycreationdialog.cpp b/src/libs/ssh/sshkeycreationdialog.cpp index a079ef5f5b7..a720e7b3adc 100644 --- a/src/libs/ssh/sshkeycreationdialog.cpp +++ b/src/libs/ssh/sshkeycreationdialog.cpp @@ -77,6 +77,8 @@ void SshKeyCreationDialog::keyTypeChanged() keySizes << QLatin1String("1024") << QLatin1String("2048") << QLatin1String("4096"); else if (m_ui->ecdsa->isChecked()) keySizes << QLatin1String("256") << QLatin1String("384") << QLatin1String("521"); + else if (m_ui->dsa->isChecked()) + keySizes << QLatin1String("1024"); m_ui->comboBox->addItems(keySizes); if (!keySizes.isEmpty()) m_ui->comboBox->setCurrentIndex(0); diff --git a/src/libs/ssh/sshkeygenerator.cpp b/src/libs/ssh/sshkeygenerator.cpp index 253e45f6a47..eb85c1aa66f 100644 --- a/src/libs/ssh/sshkeygenerator.cpp +++ b/src/libs/ssh/sshkeygenerator.cpp @@ -83,7 +83,7 @@ bool SshKeyGenerator::generateKeys(KeyType type, PrivateKeyFormat format, int ke generateOpenSslPublicKeyString(key); } return true; - } catch (const Exception &e) { + } catch (const std::exception &e) { m_error = tr("Error generating key: %1").arg(QString::fromLatin1(e.what())); return false; } diff --git a/src/libs/ssh/sshremoteprocess.cpp b/src/libs/ssh/sshremoteprocess.cpp index 2f31b39fbc4..5a875d1f105 100644 --- a/src/libs/ssh/sshremoteprocess.cpp +++ b/src/libs/ssh/sshremoteprocess.cpp @@ -209,7 +209,7 @@ void SshRemoteProcess::sendSignal(Signal signal) QSSH_ASSERT_AND_RETURN(signalString); d->m_sendFacility.sendChannelSignalPacket(d->remoteChannel(), signalString); } - } catch (const Botan::Exception &e) { + } catch (const std::exception &e) { setErrorString(QString::fromLatin1(e.what())); d->closeChannel(); } diff --git a/src/libs/ssh/sshtcpipforwardserver.cpp b/src/libs/ssh/sshtcpipforwardserver.cpp index 89cc2f680c9..5501ea930b9 100644 --- a/src/libs/ssh/sshtcpipforwardserver.cpp +++ b/src/libs/ssh/sshtcpipforwardserver.cpp @@ -86,7 +86,7 @@ void SshTcpIpForwardServer::initialize() emit stateChanged(Initializing); d->m_sendFacility.sendTcpIpForwardPacket(d->m_bindAddress.toUtf8(), d->m_bindPort); d->m_timeoutTimer.start(d->ReplyTimeout); - } catch (const Botan::Exception &e) { + } catch (const std::exception &e) { qCWarning(sshLog, "Botan error: %s", e.what()); d->m_timeoutTimer.stop(); setClosed(); @@ -105,7 +105,7 @@ void SshTcpIpForwardServer::close() d->m_sendFacility.sendCancelTcpIpForwardPacket(d->m_bindAddress.toUtf8(), d->m_bindPort); d->m_timeoutTimer.start(d->ReplyTimeout); - } catch (const Botan::Exception &e) { + } catch (const std::exception &e) { qCWarning(sshLog, "Botan error: %s", e.what()); d->m_timeoutTimer.stop(); setClosed(); |