diff --git a/oid4vc-core/src/test_utils.rs b/oid4vc-core/src/test_utils.rs index c9fa42e..8261c51 100644 --- a/oid4vc-core/src/test_utils.rs +++ b/oid4vc-core/src/test_utils.rs @@ -44,7 +44,7 @@ impl Sign for TestSubject { fn external_signer(&self) -> Option> { None } - fn jwt_header(&self) -> jsonwebtoken::Header { + async fn jwt_header(&self) -> jsonwebtoken::Header { todo!{} } } diff --git a/oid4vc-manager/src/managers/credential_issuer.rs b/oid4vc-manager/src/managers/credential_issuer.rs index ed612db..c6749b0 100644 --- a/oid4vc-manager/src/managers/credential_issuer.rs +++ b/oid4vc-manager/src/managers/credential_issuer.rs @@ -32,6 +32,7 @@ impl, CFC: CredentialFormatCollection> CredentialIssuerManager, //TODO: Not RFC but if only preauth certain issuer put it here pub token_endpoint: Option, pub batch_credential_endpoint: Option, @@ -76,6 +77,8 @@ mod tests { credential_issuer: "https://credential-issuer.example.com".parse().unwrap(), authorization_servers: vec!["https://server.example.com".parse().unwrap()], credential_endpoint: Url::parse("https://credential-issuer.example.com").unwrap(), + nonce_endpoint: None, + token_endpoint: None, batch_credential_endpoint: Some( "https://credential-issuer.example.com/batch_credential" .parse() @@ -153,7 +156,8 @@ mod tests { proof_types_supported: vec![( ProofType::Jwt, KeyProofMetadata { - proof_signing_alg_values_supported: vec!["ES256".to_string()] + proof_signing_alg_values_supported: vec!["ES256".to_string()], + key_attestations_required: None, } )] .into_iter() diff --git a/oid4vci/src/credential_request.rs b/oid4vci/src/credential_request.rs index 448615d..84ce430 100644 --- a/oid4vci/src/credential_request.rs +++ b/oid4vci/src/credential_request.rs @@ -69,6 +69,7 @@ mod tests { use serde::de::DeserializeOwned; use serde_json::json; use std::{fs::File, path::Path}; + use OneOrManyKeyProofs::{Proof, Proofs}; fn json_example(path: &str) -> T where diff --git a/oid4vci/src/proof.rs b/oid4vci/src/proof.rs index 6442b7e..fe08594 100644 --- a/oid4vci/src/proof.rs +++ b/oid4vci/src/proof.rs @@ -29,6 +29,15 @@ pub enum KeyProofsType { #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)] pub struct KeyProofMetadata { pub proof_signing_alg_values_supported: Vec, + pub key_attestations_required: Option, +} + +#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)] +pub struct KeyAttestationMetadata { + #[serde(skip_serializing_if = "Vec::is_empty", default)] + pub key_storage: Vec, + #[serde(skip_serializing_if = "Vec::is_empty", default)] + pub user_authentication: Vec, } #[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq, Hash)] diff --git a/oid4vci/src/wallet/content_encryption.rs b/oid4vci/src/wallet/content_encryption.rs index b0fd863..f79161c 100644 --- a/oid4vci/src/wallet/content_encryption.rs +++ b/oid4vci/src/wallet/content_encryption.rs @@ -133,7 +133,6 @@ pub fn base64_decode_bytes>(bytes: &T) -> anyhow::Result> #[cfg(test)] mod tests { use hmac::Mac; - use oid4vc_core::jwt::base64_url_encode; use rsa::{rand_core::OsRng, traits::PublicKeyParts}; use crate::wallet::content_encryption::{base64_encode_bytes, HmacSha256}; @@ -146,7 +145,7 @@ mod tests { let e = base64_encode_bytes(&exponent); let n = pub_key.n().to_bytes_be(); - let n = base64_encode_bytes(&n); + let _n = base64_encode_bytes(&n); println!("{:?}", exponent); println!("{}", pub_key.e().to_string()); println!("{}", e); diff --git a/siopv2/src/test_utils.rs b/siopv2/src/test_utils.rs index 179c547..2db43ab 100644 --- a/siopv2/src/test_utils.rs +++ b/siopv2/src/test_utils.rs @@ -44,7 +44,7 @@ impl Sign for TestSubject { fn external_signer(&self) -> Option> { None } - fn jwt_header(&self) -> jsonwebtoken::Header { + async fn jwt_header(&self) -> jsonwebtoken::Header { todo!{} } }