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/>. ...@@ -271,7 +271,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
cloud.token = token; cloud.token = token;
cloud.pithos_public = pithos_public; cloud.pithos_public = pithos_public;
cloud.uuid = uuid; cloud.uuid = uuid;
if(cert) cloud.cert = cert; if(cert != DEFAULT_CERT) cloud.cert = cert;
clouds[cloud_name] = cloud; clouds[cloud_name] = cloud;
render_clouds(""); render_clouds("");
......
...@@ -237,8 +237,10 @@ function call_duplicity(mode, backup_set, force) { ...@@ -237,8 +237,10 @@ function call_duplicity(mode, backup_set, force) {
$("#res-cloud").val() + "/" + $("#res-backup-name"); $("#res-cloud").val() + "/" + $("#res-backup-name");
args.push("--name", SHA256(backup_name)); args.push("--name", SHA256(backup_name));
var cert = (backup_set) ? clouds[backup_set.cloud].cert : var sel_cloud = (backup_set) ? backup_set.cloud :
clouds[$("#res-cloud").val()].cert; $("#res-cloud").val();
var cert = (clouds[sel_cloud].cert) ?
clouds[sel_cloud].cert : DEFAULT_CERT;
args.push("--ssl-cacert-file", cert); args.push("--ssl-cacert-file", cert);
if(force) args.push("--force"); if(force) args.push("--force");
......
...@@ -157,8 +157,9 @@ function get_contents_by_date(value) { ...@@ -157,8 +157,9 @@ function get_contents_by_date(value) {
init_path = time_path; init_path = time_path;
} }
var datapath = path.join(BAAS_CACHE_DIR, 'timeviews'); var datapath = path.join(BAAS_CACHE_DIR, 'timeviews');
var cacert_file = " " + var cert = (clouds[$("#cloud").val()].cert) ?
escape_quote_str(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 archive_dir = " " + escape_quote_str(BAAS_ARCHIVE_DIR);
var backup_name = " " + var backup_name = " " +
SHA256($("#backup_name").val() + "/" + $("#cloud").val()); 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