diff options
| author | David Lönnhager <david.l@mullvad.net> | 2025-02-08 22:47:20 +0100 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2025-03-05 23:31:58 +0100 |
| commit | 5542403cdb3687f4f7afd4ed569be208334c10b4 (patch) | |
| tree | 9638fe7980c9ca9f2e84a1741364a39e9eb75dfd | |
| parent | 951d907dc72ba1ad4d37044b431cc833c773ad80 (diff) | |
| download | mullvadvpn-5542403cdb3687f4f7afd4ed569be208334c10b4.tar.xz mullvadvpn-5542403cdb3687f4f7afd4ed569be208334c10b4.zip | |
Remove signature download step
| -rw-r--r-- | installer-downloader/src/ui_downloader.rs | 13 | ||||
| -rw-r--r-- | installer-downloader/tests/controller.rs | 4 | ||||
| -rw-r--r-- | mullvad-update/src/app.rs | 11 |
3 files changed, 1 insertions, 27 deletions
diff --git a/installer-downloader/src/ui_downloader.rs b/installer-downloader/src/ui_downloader.rs index 18eeb0074d..67fa9322d2 100644 --- a/installer-downloader/src/ui_downloader.rs +++ b/installer-downloader/src/ui_downloader.rs @@ -37,19 +37,6 @@ impl<Delegate: AppDelegate, Downloader: AppDownloader + Send + 'static> impl<Delegate: AppDelegate, Downloader: AppDownloader + Send + 'static> AppDownloader for UiAppDownloader<Delegate, Downloader> { - async fn download_signature(&mut self) -> Result<(), app::DownloadError> { - if let Err(error) = self.downloader.download_signature().await { - self.queue.queue_main(move |self_| { - self_.set_download_text("ERROR: Failed to retrieve signature."); - self_.enable_download_button(); - self_.hide_cancel_button(); - }); - Err(error) - } else { - Ok(()) - } - } - async fn download_executable(&mut self) -> Result<(), app::DownloadError> { match self.downloader.download_executable().await { Ok(()) => { diff --git a/installer-downloader/tests/controller.rs b/installer-downloader/tests/controller.rs index 5f227bbdb2..6576512375 100644 --- a/installer-downloader/tests/controller.rs +++ b/installer-downloader/tests/controller.rs @@ -65,10 +65,6 @@ pub struct FakeAppDownloader<const EXE_SUCCEED: bool, const VERIFY_SUCCEED: bool impl<const EXE_SUCCEED: bool, const VERIFY_SUCCEED: bool> AppDownloader for FakeAppDownloader<EXE_SUCCEED, VERIFY_SUCCEED> { - async fn download_signature(&mut self) -> Result<(), DownloadError> { - Ok(()) - } - async fn download_executable(&mut self) -> Result<(), DownloadError> { self.params.app_progress.set_url(&self.params.app_url); self.params.app_progress.set_progress(0.); diff --git a/mullvad-update/src/app.rs b/mullvad-update/src/app.rs index ef08971bb0..c6cfb1eb45 100644 --- a/mullvad-update/src/app.rs +++ b/mullvad-update/src/app.rs @@ -1,4 +1,4 @@ -//! This module implements the flow of downloading and verifying the app signature. +//! This module implements the flow of downloading and verifying the app. use std::path::PathBuf; @@ -26,9 +26,6 @@ pub struct AppDownloaderParameters<AppProgress> { /// See the [module-level documentation](self). #[async_trait::async_trait] pub trait AppDownloader: Send { - /// Download the app signature. - async fn download_signature(&mut self) -> Result<(), DownloadError>; - /// Download the app binary. async fn download_executable(&mut self) -> Result<(), DownloadError>; @@ -38,7 +35,6 @@ pub trait AppDownloader: Send { /// Download the app and signature, and verify the app's signature pub async fn install_and_upgrade(mut downloader: impl AppDownloader) -> Result<(), DownloadError> { - downloader.download_signature().await?; downloader.download_executable().await?; downloader.verify().await } @@ -67,11 +63,6 @@ impl<AppProgress: ProgressUpdater> From<AppDownloaderParameters<AppProgress>> #[async_trait::async_trait] impl<AppProgress: ProgressUpdater> AppDownloader for HttpAppDownloader<AppProgress> { - async fn download_signature(&mut self) -> Result<(), DownloadError> { - // TODO: no-op, remove - Ok(()) - } - async fn download_executable(&mut self) -> Result<(), DownloadError> { fetch::get_to_file( self.bin_path(), |
