From 40eb97893152e8a618f31b1f8e60302a1364162d Mon Sep 17 00:00:00 2001 From: Simon Vetter Date: Tue, 20 Jan 2015 14:28:29 +0100 Subject: [PATCH] fix checksum verification for downloaded boxes (fixes #4665) This makes sure that config.vm.box_download_checksum and config.vm.box_download_checksum_type get passed to Vagrant::Action.action_box_add with other options on box download/import. --- lib/vagrant/action/builtin/handle_box.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/vagrant/action/builtin/handle_box.rb b/lib/vagrant/action/builtin/handle_box.rb index a01e49d64..8cbdd413c 100644 --- a/lib/vagrant/action/builtin/handle_box.rb +++ b/lib/vagrant/action/builtin/handle_box.rb @@ -64,6 +64,8 @@ module Vagrant box_download_ca_path = machine.config.vm.box_download_ca_path box_download_client_cert = machine.config.vm.box_download_client_cert box_download_insecure = machine.config.vm.box_download_insecure + box_download_checksum_type = machine.config.vm.box_download_checksum_type + box_download_checksum = machine.config.vm.box_download_checksum box_formats = machine.provider_options[:box_format] || machine.provider_name @@ -86,6 +88,8 @@ module Vagrant box_download_ca_cert: box_download_ca_cert, box_download_ca_path: box_download_ca_path, box_download_insecure: box_download_insecure, + box_checksum_type: box_download_checksum_type, + box_checksum: box_download_checksum, })) rescue Errors::BoxAlreadyExists # Just ignore this, since it means the next part will succeed!