Commit 0068b2e1 authored by Efthymia Bika's avatar Efthymia Bika

Do not save default certificate path

parent f913345d
......@@ -271,7 +271,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
cloud.token = token;
cloud.pithos_public = pithos_public;
cloud.uuid = uuid;
if(cert) cloud.cert = cert;
if(cert != DEFAULT_CERT) cloud.cert = cert;
clouds[cloud_name] = cloud;
render_clouds("");
......
......@@ -237,8 +237,10 @@ function call_duplicity(mode, backup_set, force) {
$("#res-cloud").val() + "/" + $("#res-backup-name");
args.push("--name", SHA256(backup_name));
var cert = (backup_set) ? clouds[backup_set.cloud].cert :
clouds[$("#res-cloud").val()].cert;
var sel_cloud = (backup_set) ? backup_set.cloud :
$("#res-cloud").val();
var cert = (clouds[sel_cloud].cert) ?
clouds[sel_cloud].cert : DEFAULT_CERT;
args.push("--ssl-cacert-file", cert);
if(force) args.push("--force");
......
......@@ -157,8 +157,9 @@ function get_contents_by_date(value) {
init_path = time_path;
}
var datapath = path.join(BAAS_CACHE_DIR, 'timeviews');
var cacert_file = " " +
escape_quote_str(clouds[$("#cloud").val()].cert) + " ";
var cert = (clouds[$("#cloud").val()].cert) ?
clouds[$("#cloud").val()].cert : DEFAULT_CERT;
var cacert_file = " " + escape_quote_str(cert) + " ";
var archive_dir = " " + escape_quote_str(BAAS_ARCHIVE_DIR);
var backup_name = " " +
SHA256($("#backup_name").val() + "/" + $("#cloud").val());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment