summaryrefslogtreecommitdiff
path: root/src/libs/ssh/sshchannel.cpp
Commit message (Collapse)AuthorAgeFilesLines
* SSH: Use OpenSSH toolsChristian Kandeler2018-12-131-269/+0
| | | | | | | | | | | | | | | | | | | | | | | | ... instead of our own SSH library. Advantages: - Full compatibility with OpenSSH behavior guaranteed. - Minimal maintenance effort. - Less code to build. - Big chunk of 3rd party sources can be removed from our repository. One the downside, Windows users now need to install OpenSSH for RemoteLinux support. Hoewever, people doing embedded development probably have it installed anyway. [ChangeLog] Switched SSH backend to OpenSSH Fixes: QTCREATORBUG-15744 Fixes: QTCREATORBUG-15807 Fixes: QTCREATORBUG-19306 Fixes: QTCREATORBUG-20210 Change-Id: Ifcfefdd39401e45ba1f4aca35d2c5bf7046c7aab Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* SSH: Remove nonsensical checkChristian Kandeler2018-11-061-9/+0
| | | | | | | There is no minimum requirement for the per-channel maximum packet size. Change-Id: Iced6e3bb1b77f7642d39d4a113ab4236af6b247b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* SSH: Use Botan2Christian Kandeler2018-08-101-2/+0
| | | | | | | | | | | | | | | | Botan 1.10 will be completely unsupported by the end of this year, so we now target API version 2 instead. Also upgrade our bundled Botan to the latest version 2.7. We no longer check in pre-processed files, but use the upstream sources directly (with unneeded parts removed), employing Botan's own configure script for building. This will make future upgrades much simpler. A script to automate this process is also provided. Task-number: QTCREATORBUG-18802 Task-number: QTCREATORBUG-8107 Change-Id: I5a5ea62cfd30d720b556217142e8b7e06bf49f7e Reviewed-by: hjk <hjk@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* SSH: Catch std::exception rather than Botan-specific onesChristian Kandeler2017-05-051-2/+2
| | | | | | | | | | In particular, the existence of Botan::Exception wrongly suggests that it is the parent class of all Botan-specific exceptions. This assumption, combined with a different bug that will be fixed in a follow-up commit, caused a crash in the key generator. Change-Id: I0aafb761052d185051df217c9914010235a7c77b Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* Ssh: Implement tcp/ip forward tunnelingUlf Hermann2016-05-231-1/+1
| | | | | Change-Id: I529b3392ea7e4cbae2c736c9f55352ef6b19da98 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Update License according to agreement with Free Qt FoundationTobias Hunger2016-01-191-17/+12
| | | | | | | * Update remaining files in src Change-Id: I1896f17fcf34f71c3310c87899fb5171b8e4afb1 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* SSH: Use categorized logging.Christian Kandeler2016-01-181-13/+8
| | | | | | Change-Id: I9890c7d4a86320c835e70e66c523c5a2f7b41421 Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* SSH: Fix wrongly emitted assert.Christian Kandeler2015-06-181-1/+2
| | | | | Change-Id: Ib19030ccbf708a7ad738df89f3fc0a45b0052bb9 Reviewed-by: hjk <hjk@theqtcompany.com>
* Merge commit '3c85058694ee2e41658d17f524fb48f0b187d2fe'Eike Ziller2015-02-121-6/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/libs/utils/tooltip/tipcontents.cpp src/libs/utils/tooltip/tipcontents.h src/plugins/android/androiddeployqtstep.cpp src/plugins/baremetal/baremetalconstants.h src/plugins/baremetal/baremetaldevice.cpp src/plugins/baremetal/baremetaldevice.h src/plugins/baremetal/baremetaldeviceconfigurationwidget.cpp src/plugins/baremetal/baremetaldeviceconfigurationwidget.h src/plugins/baremetal/baremetaldeviceconfigurationwizard.cpp src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.cpp src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.h src/plugins/baremetal/baremetalplugin.cpp src/plugins/baremetal/baremetalplugin.h src/plugins/baremetal/baremetalruncontrolfactory.cpp src/plugins/baremetal/baremetalruncontrolfactory.h src/plugins/cppeditor/cppcodemodelinspectordialog.cpp src/plugins/cppeditor/cppdoxygen_test.cpp src/plugins/cppeditor/cppdoxygen_test.h src/plugins/debugger/breakpointmarker.cpp src/plugins/debugger/debuggeritemmodel.cpp src/plugins/debugger/debuggeritemmodel.h src/plugins/debugger/loadcoredialog.cpp src/plugins/genericprojectmanager/cppmodelmanagerhelper.cpp src/plugins/projectexplorer/addnewmodel.cpp src/plugins/projectexplorer/addnewmodel.h src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp src/plugins/qmlprofiler/abstracttimelinemodel.cpp src/plugins/qmlprofiler/abstracttimelinemodel.h src/plugins/qmlprofiler/notesmodel.cpp src/plugins/qmlprofiler/qml/CategoryLabel.qml src/plugins/qmlprofiler/qml/MainView.qml src/plugins/qmlprofiler/qml/Overview.js src/plugins/qmlprofiler/qml/Overview.qml src/plugins/qmlprofiler/qml/TimeDisplay.qml src/plugins/qmlprofiler/qml/TimeMarks.qml src/plugins/qmlprofiler/qmlprofilertimelinemodelproxy.cpp src/plugins/qmlprofiler/sortedtimelinemodel.cpp src/plugins/qmlprofiler/sortedtimelinemodel.h src/plugins/qmlprofiler/timelinemodelaggregator.cpp src/plugins/qmlprofiler/timelinemodelaggregator.h src/plugins/qmlprofiler/timelinerenderer.cpp src/plugins/qmlprofiler/timelinerenderer.h src/plugins/qmlprojectmanager/QmlProjectManager.json.in src/plugins/texteditor/findinfiles.cpp src/plugins/vcsbase/vcsconfigurationpage.cpp src/shared/qbs src/shared/scriptwrapper/interface_wrap_helpers.h src/shared/scriptwrapper/wrap_helpers.h tests/auto/qmlprofiler/abstracttimelinemodel/tst_abstracttimelinemodel.cpp tests/system/suite_debugger/tst_debug_empty_main/test.py tests/system/suite_debugger/tst_qml_js_console/test.py tests/system/suite_debugger/tst_qml_locals/test.py Change-Id: I67540b648f8b162496f4aa606b04d50c7c9125c6
| * Update LicenseEike Ziller2015-01-161-6/+6
| | | | | | | | | | Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* | Merge remote-tracking branch 'origin/3.3'Eike Ziller2014-12-011-6/+13
|\ \ | |/
| * SSH: Delay channel close request to server in SessionRequested state.Christian Kandeler2014-11-271-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If closeChannel() is called in between our channel open request to the server and the corresponding reply, we cannot forward the close request to the server, as we don't have its channel id yet. So wait until we do. Our failure to correctly handle this sequence of events was the root cause for the following user-visible errors: - A (since-removed) Q_ASSERT in ~SshRemoteProcess() was hit. - The server closed the connection because we referred to an invalid channel ("Received ieof for nonexistent channel -1"). Commits 26920307f0 and 3027bcc952 are also related to this issue. Change-Id: I4994d85f5b21a72682f75389cdf8769738bd6768 Reviewed-by: hjk <hjk121@nokiamail.com>
* | Catch exceptions by const reference.Christian Kandeler2014-11-281-2/+2
| | | | | | | | | | Change-Id: Ic537fd123478a4f8fe4e54736d444fa64fd62d9c Reviewed-by: hjk <hjk121@nokiamail.com>
* | Ssh: Remove indirection in AbstractSshChannel::m_timeoutTimerhjk2014-11-271-7/+7
|/ | | | | | | ... and connect it using Qt5-style connects. Change-Id: Ic7f36949b38d4773f5ac0f04853abf93bebcf467 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* SSH: Fix misleading error message.Christian Kandeler2014-11-261-8/+20
| | | | | | | | | | | - It is not an error if the server replies to one of our earlier requests while we are in closing state. This can happen if we close the channel shortly after sending the other request. - Also change the message itself, which could be interpreted as "packet corrupt" when we actually meant "packet unexpected". Change-Id: I735c67b2a9b41af0c5e0b8d229369d94ec37277c Reviewed-by: hjk <hjk121@nokiamail.com>
* License updateEike Ziller2014-10-091-7/+8
| | | | | Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* SSH: Fix maximum packet size check.Christian Kandeler2014-09-111-3/+5
| | | | | | | | The statement in the RFC was misunderstood. Task-number: QTCREATORBUG-12884 Change-Id: Icd533362ebf95d963cacc8d11da03360e742f070 Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
* Incremented year in copyright infoRobert Loehning2014-01-081-1/+1
| | | | | | Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Merge remote-tracking branch 'origin/2.6'Oswald Buddenhagen2013-01-311-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in src/plugins/debugger/qtmessageloghandler.cpp src/plugins/debugger/qtmessagelogwindow.cpp src/plugins/madde/maemodeployconfigurationwidget.cpp src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp src/plugins/qmldesigner/designercore/include/widgetqueryview.h src/plugins/qmldesigner/designercore/metainfo/metainfoparser.cpp src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.cpp src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.h src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp src/plugins/qnx/bardescriptormagicmatcher.h src/plugins/qt4projectmanager/profilekeywords.cpp src/plugins/remotelinux/deployablefilesperprofile.cpp src/plugins/remotelinux/deployablefilesperprofile.h src/plugins/remotelinux/deploymentinfo.cpp src/plugins/remotelinux/deploymentsettingsassistant.cpp src/plugins/remotelinux/profilesupdatedialog.cpp tests/auto/icheckbuild/ichecklib.cpp tests/auto/icheckbuild/parsemanager.cpp tests/auto/icheckbuild/parsemanager.h Change-Id: Ie465a578446a089e1c502d1cb1096e84ca058104
| * Incremented year in copyright infov2.6.2Robert Loehning2013-01-291-1/+1
| | | | | | | | | | Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | Merge remote-tracking branch 'origin/2.6'Eike Ziller2012-10-051-21/+20
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.cpp share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.h src/plugins/debugger/qtmessageloghandler.cpp src/plugins/debugger/qtmessageloghandler.h src/plugins/debugger/qtmessagelogwindow.cpp src/plugins/madde/maemodeployconfigurationwidget.cpp src/plugins/madde/maemodeployconfigurationwidget.h src/plugins/remotelinux/deployablefilesperprofile.cpp src/plugins/remotelinux/deployablefilesperprofile.h src/plugins/remotelinux/deploymentinfo.cpp src/plugins/remotelinux/deploymentinfo.h src/plugins/remotelinux/deploymentsettingsassistant.cpp src/plugins/remotelinux/profilesupdatedialog.cpp src/plugins/remotelinux/remotelinuxdeploymentdatamodel.h tests/auto/icheckbuild/ichecklib.cpp tests/auto/icheckbuild/ichecklib_global.h tests/auto/icheckbuild/parsemanager.cpp tests/auto/icheckbuild/parsemanager.h tests/manual/ssh/tunnel/tunnel.h Change-Id: I04d7761df6bd936ad00e0547974284c967d39580
| * Adjust license headershjk2012-10-051-21/+20
| | | | | | | | | | Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* | SSH: Implement tunneling.Christian Kandeler2012-08-281-14/+19
|/ | | | | | | | | This is the "direct-tcpip" port forwarding specified in RFC 4254. Change-Id: I1ffa2e923b4479c7211b1b4304e66895b565fb64 Reviewed-by: hjk <qthjk@ovi.com> Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
* Contact -> qt-project.orgEike Ziller2012-07-191-3/+1
| | | | | Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Update botan library.Christian Kandeler2012-06-261-1/+1
| | | | | | | | | | | | Old version was 1.8.8, new one is 1.10.2. We now put all the code into one pair of files (via a botan configure option) and move platform-specific defines into the pro/qbs files. Besides drastically reducing the number of files, this is expected to make future updates less messy. Change-Id: I004166b2ab15b6a699d69aebfcfd9999c5ccdb91 Reviewed-by: hjk <qthjk@ovi.com>
* SSH: Fix send buffer flushing.Christian Kandeler2012-06-061-3/+5
| | | | | | | | There might be more data to send than what fits into one packet. This case was not handled correctly. Change-Id: I5a415223c37ec8a041503d901bbcc81e903f46d9 Reviewed-by: Daniel Molkentin <daniel.molkentin@nokia.com>
* Move SSH support into a dedicated library.Christian Kandeler2012-05-221-0/+263
It does not belong into libUtils, which is a collection of small unrelated utility classes. Task-number: QTCREATORBUG-7218 Change-Id: Id92b9f28678afec93e6f07166adfde6550f38072 Reviewed-by: Eike Ziller <eike.ziller@nokia.com>