summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2025-02-27 14:16:44 +0100
committerDavid Lönnhager <david.l@mullvad.net>2025-03-05 23:32:34 +0100
commit99a8a4aa327e16d6db118eed2a2377acfb24394f (patch)
tree971e7766dd0ca7699fef617bdefda5ae50e0623a
parent73ea790988fad37e33056ff3feff649422da025d (diff)
downloadmullvadvpn-99a8a4aa327e16d6db118eed2a2377acfb24394f.tar.xz
mullvadvpn-99a8a4aa327e16d6db118eed2a2377acfb24394f.zip
Move constants to top in installer-downloader
-rw-r--r--installer-downloader/src/controller.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/installer-downloader/src/controller.rs b/installer-downloader/src/controller.rs
index 829e51b511..425d89d113 100644
--- a/installer-downloader/src/controller.rs
+++ b/installer-downloader/src/controller.rs
@@ -15,6 +15,10 @@ use rand::seq::SliceRandom;
use tokio::sync::{mpsc, oneshot};
+/// ed25519 pubkey used to verify metadata from the Mullvad (stagemole) API
+const VERSION_PROVIDER_PUBKEY: &str = include_str!("../../mullvad-update/stagemole-pubkey");
+
+/// Pinned root certificate used when fetching version metadata
const PINNED_CERTIFICATE: &[u8] = include_bytes!("../../mullvad-api/le_root_cert.pem");
/// Actions handled by an async worker task in [handle_action_messages].
@@ -39,9 +43,8 @@ pub fn initialize_controller<T: AppDelegate + 'static>(delegate: &mut T, environ
type DirProvider = crate::temp::TempDirProvider;
// Version info provider to use
- const STAGEMOLE_PUBKEY: &str = include_str!("../../mullvad-update/stagemole-pubkey");
let verifying_key =
- mullvad_update::format::key::VerifyingKey::from_hex(STAGEMOLE_PUBKEY).expect("valid key");
+ mullvad_update::format::key::VerifyingKey::from_hex(VERSION_PROVIDER_PUBKEY).expect("valid key");
let cert = reqwest::Certificate::from_pem(PINNED_CERTIFICATE).expect("invalid cert");
let version_provider = HttpVersionInfoProvider {
url: get_metadata_url(),