[sftp] Add additional sftpProtocol::openConnection() for libssh 0.8.3+
ClosedPublic

Authored by asn on Oct 31 2018, 10:25 AM.

Details

Summary

This uses the new known_hosts API and creates SHA256 fingerprints for
public key verifcation.

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>

Diff Detail

Repository
R320 KIO Extras
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
asn requested review of this revision.Oct 31 2018, 10:25 AM
asn created this revision.
asn added a comment.Oct 31 2018, 10:27 AM

I've did a copy and paste of this, as libssh 0.8 is the way forward and the non 0.8 code should just be removed as soon as possible. In order to address a lot of issues, one needs to use libssh 0.8.

sitter added a subscriber: sitter.Oct 31 2018, 10:31 AM

The size of the ifdef (and the therein contained code copy) isn't making me super excited. OTOH there are some 10 or 20 differences between the two if-branches, so separating it into multiple ifdefs is likely a mess as well. And @asn pointed out that doing it this way makes it easier to drop the legacy branch in the future.

Anyone got ideas how to make it better?

I am somewhat 'meh' about the ifdef but not enough to object, so in the absence of improvement suggests I'd probably go +1

ngraham accepted this revision.Nov 6 2018, 3:58 PM

The size of the ifdef (and the therein contained code copy) isn't making me super excited. OTOH there are some 10 or 20 differences between the two if-branches, so separating it into multiple ifdefs is likely a mess as well. And @asn pointed out that doing it this way makes it easier to drop the legacy branch in the future.

Anyone got ideas how to make it better?

I am somewhat 'meh' about the ifdef but not enough to object, so in the absence of improvement suggests I'd probably go +1

Agreed, in this case I think the code duplication actually makes future cleanup easier. Let's go for it.

This revision is now accepted and ready to land.Nov 6 2018, 3:58 PM
This revision was automatically updated to reflect the committed changes.
Restricted Application added projects: Dolphin, Frameworks. · View Herald TranscriptNov 10 2018, 8:29 PM
Restricted Application added subscribers: kfm-devel, kde-frameworks-devel. · View Herald Transcript