2023-05-25 Fred Gleason <fredg@paravelsystems.com>

* Fixed a bug in the podcasting subsystem that could cause SFTP
	operations to fail due to unknown SSH host certificates.

Signed-off-by: Fred Gleason <fredg@paravelsystems.com>
This commit is contained in:
Fred Gleason
2023-05-25 11:21:31 -04:00
parent 02b0e9d979
commit cb290a2226
5 changed files with 90 additions and 17 deletions

View File

@@ -2,7 +2,7 @@
//
// Delete a file from the audio store via the Rivendell Web Service
//
// (C) Copyright 2010-2021 Fred Gleason <fredg@paravelsystems.com>
// (C) Copyright 2010-2023 Fred Gleason <fredg@paravelsystems.com>
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 2 as
@@ -127,12 +127,14 @@ RDDelete::ErrorCode RDDelete::runDelete(const QString &username,
//
if((conv_target_url.scheme().toLower()=="sftp")&&
(!id_filename.isEmpty())&&use_id_filename) {
curl_easy_setopt(curl,CURLOPT_SSL_VERIFYHOST,0); // Don't verify hostkey
curl_easy_setopt(curl,CURLOPT_USERNAME,username.toUtf8().constData());
curl_easy_setopt(curl,CURLOPT_SSH_PRIVATE_KEYFILE,
id_filename.toUtf8().constData());
curl_easy_setopt(curl,CURLOPT_KEYPASSWD,password.toUtf8().constData());
}
else {
curl_easy_setopt(curl,CURLOPT_SSL_VERIFYHOST,0); // Don't verify hostkey
curl_easy_setopt(curl,CURLOPT_USERPWD,
(username+":"+password).toUtf8().constData());
}