Build and serve signed Linux ARM64 agent releases
This commit is contained in:
@@ -15,7 +15,7 @@ use rmm_domain::{
|
||||
};
|
||||
use rmm_privileged_helper::{Binding, TrustedClock};
|
||||
use rmm_updater::{
|
||||
ActiveRelease, Platform as ReleasePlatform, ReleaseRelation, SignedRelease, TrustedContext,
|
||||
ActiveRelease, ReleaseRelation, SignedRelease, TrustedContext,
|
||||
TrustedUpdateKey, UpdateKeyring, verify_release,
|
||||
};
|
||||
use serde::Deserialize;
|
||||
@@ -346,12 +346,12 @@ impl Trust {
|
||||
.try_into()
|
||||
.map_err(|_| anyhow::anyhow!("UPDATE_CATALOG_KEY_SIZE"))?;
|
||||
ensure!(
|
||||
key.platform == Platform::LinuxX64 && key.public_key_hex != binding.public_key_hex,
|
||||
key.platform == Platform::NATIVE_LINUX && key.public_key_hex != binding.public_key_hex,
|
||||
"UPDATE_CATALOG_KEY_SEPARATION"
|
||||
);
|
||||
trusted.push(TrustedUpdateKey::new(
|
||||
public,
|
||||
ReleasePlatform::LinuxX64,
|
||||
Platform::NATIVE_LINUX.into(),
|
||||
key.first_sequence,
|
||||
key.last_sequence,
|
||||
key.revoked,
|
||||
@@ -426,7 +426,7 @@ impl Trust {
|
||||
},
|
||||
&self.keys,
|
||||
&TrustedContext {
|
||||
platform: ReleasePlatform::LinuxX64,
|
||||
platform: Platform::NATIVE_LINUX.into(),
|
||||
now_utc_seconds: now,
|
||||
keyring_generation: self.generation,
|
||||
protocol_major: self.protocol,
|
||||
@@ -522,9 +522,10 @@ async fn request(
|
||||
async fn fetch(client: &reqwest::Client, address: SocketAddr) -> Result<Vec<u8>> {
|
||||
let response = client
|
||||
.get(format!(
|
||||
"https://{}:{}/agent/v1/releases/current?platform=x86_64-unknown-linux-gnu",
|
||||
"https://{}:{}/agent/v1/releases/current?platform={}",
|
||||
crate::https_channel::server_name()?,
|
||||
address.port()
|
||||
address.port(),
|
||||
Platform::NATIVE_LINUX.target_triple()
|
||||
))
|
||||
.send()
|
||||
.await?;
|
||||
|
||||
Reference in New Issue
Block a user