Skip to content

Commit

Permalink
chore(deps): Bump kbs-types from 0.6.0 to 0.7.0
Browse files Browse the repository at this point in the history
kbs-types introduces a break in JSON semantics so we bump the
kbs protocol version from 0.1.0 to 0.1.1.

Signed-off-by: Mikko Ylinen <[email protected]>
  • Loading branch information
mythi committed Jul 31, 2024
1 parent 3e65d26 commit b60f7e6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ env_logger = "0.11.3"
hex = "0.4.3"
hmac = "0.12.1"
jwt-simple = { version = "0.12", default-features = false, features = ["pure-rust"] }
kbs-types = "0.6.0"
kbs-types = "0.7.0"
lazy_static = "1.4.0"
log = "0.4.14"
nix = "0.28"
Expand Down
2 changes: 1 addition & 1 deletion attestation-agent/kbs_protocol/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub struct KbsClient<T> {
pub(crate) token: Option<Token>,
}

pub const KBS_PROTOCOL_VERSION: &str = "0.1.0";
pub const KBS_PROTOCOL_VERSION: &str = "0.1.1";

pub const KBS_GET_RESOURCE_MAX_ATTEMPT: u64 = 3;

Expand Down
4 changes: 2 additions & 2 deletions attestation-agent/kbs_protocol/src/client/rcar_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ impl KbsClient<Box<dyn EvidenceProvider>> {
let request = Request {
version: String::from(KBS_PROTOCOL_VERSION),
tee,
extra_params: String::new(),
extra_params: serde_json::Value::String(String::new()),
};

debug!("send auth request to {auth_endpoint}");
Expand Down Expand Up @@ -145,7 +145,7 @@ impl KbsClient<Box<dyn EvidenceProvider>> {
let attest_endpoint = format!("{}/{KBS_PREFIX}/attest", self.kbs_host_url);
let attest = Attestation {
tee_pubkey,
tee_evidence: evidence,
tee_evidence: serde_json::from_str(&evidence)?, // TODO: change attesters to return Value?
};

debug!("send attest request.");
Expand Down
5 changes: 2 additions & 3 deletions attestation-agent/kbs_protocol/src/keypair.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use anyhow::{Context, Result};

use base64::{engine::general_purpose::URL_SAFE_NO_PAD, Engine};
use crypto::{
rsa::{PaddingMode, RSAKeyPair, RSA_KTY},
rsa::{PaddingMode, RSAKeyPair},
WrapType,
};
use kbs_types::{Response, TeePubKey};
Expand All @@ -31,11 +31,10 @@ impl TeeKeyPair {
let k_mod = URL_SAFE_NO_PAD.encode(self.keypair.n());
let k_exp = URL_SAFE_NO_PAD.encode(self.keypair.e());

Ok(TeePubKey {
Ok(TeePubKey::RSA {
alg: PaddingMode::PKCS1v15.as_ref().to_string(),
k_mod,
k_exp,
kty: RSA_KTY.to_string(),
})
}

Expand Down

0 comments on commit b60f7e6

Please sign in to comment.