From 986e7966dd5f914c8da55e657fad634ed789a69d Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Thu, 28 Jun 2012 17:07:29 +0200 Subject: [PATCH] bug #1321: Make use of https when registering images. Changed as proposed by SZTAKI LPDS (cherry picked from commit a62fd48e00a7ff43665ded28607fb9530b321d38) --- src/datastore_mad/remotes/fs/cp | 2 +- src/datastore_mad/remotes/iscsi/cp | 2 +- src/datastore_mad/remotes/libfs.sh | 4 ++-- src/datastore_mad/remotes/lvm/cp | 2 +- src/datastore_mad/remotes/vmware/cp | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/datastore_mad/remotes/fs/cp b/src/datastore_mad/remotes/fs/cp index 5e6fac36fa..ba5ffcbfb5 100755 --- a/src/datastore_mad/remotes/fs/cp +++ b/src/datastore_mad/remotes/fs/cp @@ -83,7 +83,7 @@ COPY_COMMAND="$UTILS_PATH/downloader.sh $HASHES $SRC $DST" # ------------ Copy the image to the repository ------------- case $SRC in -http://*) +http://*|https://*) log "Downloading $SRC to the image repository" exec_and_log "$COPY_COMMAND" "Error downloading $SRC" diff --git a/src/datastore_mad/remotes/iscsi/cp b/src/datastore_mad/remotes/iscsi/cp index 44119c73b7..995b796582 100755 --- a/src/datastore_mad/remotes/iscsi/cp +++ b/src/datastore_mad/remotes/iscsi/cp @@ -104,7 +104,7 @@ fi COPY_COMMAND="$UTILS_PATH/downloader.sh $HASHES $SRC -" case $SRC in -http://*) +http://*|https://*) log "Downloading $SRC to the image repository" DUMP="$COPY_COMMAND" diff --git a/src/datastore_mad/remotes/libfs.sh b/src/datastore_mad/remotes/libfs.sh index 6b7f5c57bd..0f625ee90d 100644 --- a/src/datastore_mad/remotes/libfs.sh +++ b/src/datastore_mad/remotes/libfs.sh @@ -91,8 +91,8 @@ EOF function fs_size { case $1 in - http://*) - SIZE=`wget -S --spider $1 2>&1 | grep Content-Length | cut -d':' -f2` + http://*|https://*) + SIZE=`wget -S --spider --no-check-certificate $1 2>&1 | grep Content-Length | cut -d':' -f2` error=$? ;; *) diff --git a/src/datastore_mad/remotes/lvm/cp b/src/datastore_mad/remotes/lvm/cp index e003b71b79..17e8124e81 100755 --- a/src/datastore_mad/remotes/lvm/cp +++ b/src/datastore_mad/remotes/lvm/cp @@ -93,7 +93,7 @@ fi COPY_COMMAND="$UTILS_PATH/downloader.sh $HASHES $SRC -" case $SRC in -http://*) +http://*|https://*) log "Downloading $SRC to the image repository" DUMP="$COPY_COMMAND" diff --git a/src/datastore_mad/remotes/vmware/cp b/src/datastore_mad/remotes/vmware/cp index 6fb6f0e148..5a39db5061 100755 --- a/src/datastore_mad/remotes/vmware/cp +++ b/src/datastore_mad/remotes/vmware/cp @@ -83,7 +83,7 @@ COPY_COMMAND="$UTILS_PATH/downloader.sh $HASHES $SRC $DST" # ------------ Copy the image to the repository ------------- case $SRC in -http://*) +http://*|https://* ) log "Downloading $SRC to the image repository" exec_and_log "$COPY_COMMAND" "Error downloading $SRC"