diff --git a/Cargo.lock b/Cargo.lock index 918704c95..02c8b0084 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -526,8 +526,8 @@ dependencies = [ "async-trait", "base64 0.22.1", "cfg-if", - "clap 4.5.4", - "ear 0.2.0", + "clap 4.5.21", + "ear 0.3.0", "env_logger 0.10.2", "futures", "hex", @@ -1675,8 +1675,9 @@ dependencies = [ [[package]] name = "ear" -version = "0.2.0" -source = "git+https://github.com/veraison/rust-ear.git#406a0524f9443db8d18f2675e719c093157800ed" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1134a8dbb5ad666d26d82da83d12b71703b16f2ed5433d5ba24d8cfea2b66d96" dependencies = [ "base64 0.22.1", "ciborium", @@ -2875,7 +2876,7 @@ dependencies = [ "config", "cryptoki", "derivative", - "ear 0.2.0", + "ear 0.3.0", "env_logger 0.10.2", "jsonwebtoken", "jwt-simple 0.11.9", diff --git a/Cargo.toml b/Cargo.toml index 8d149b5b5..08b1554f9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,8 +26,7 @@ cfg-if = "1.0.0" chrono = "0.4.19" clap = { version = "4", features = ["derive"] } config = "0.13.3" -#ear = "0.2.0" -ear = { git = "https://github.com/veraison/rust-ear.git" } +ear = "0.3.0" env_logger = "0.10.0" hex = "0.4.3" jwt-simple = "0.11" diff --git a/attestation-service/src/token/ear_broker.rs b/attestation-service/src/token/ear_broker.rs index 7aab8a206..991e8cb91 100644 --- a/attestation-service/src/token/ear_broker.rs +++ b/attestation-service/src/token/ear_broker.rs @@ -170,18 +170,11 @@ impl AttestationTokenBroker for EarAttestationTokenBroker { &self, tcb_claims: TeeEvidenceParsedClaim, policy_ids: Vec, - mut init_data_claims: serde_json::Value, - mut runtime_data_claims: serde_json::Value, + init_data_claims: serde_json::Value, + runtime_data_claims: serde_json::Value, reference_data_map: HashMap>, tee: Tee, ) -> Result { - // Temporary workaround until EAR supports null values - if let serde_json::Value::Null = init_data_claims { - init_data_claims = serde_json::Value::String("".to_string()); - } - if let serde_json::Value::Null = runtime_data_claims { - runtime_data_claims = serde_json::Value::String("".to_string()); - } let tcb_claims = transform_claims( tcb_claims,