Skip to content

Commit

Permalink
wip: patch ssi 0.9 until version mismatches are resolved
Browse files Browse the repository at this point in the history
NOTE: This is using the main branch until crates.io version
is stable.

Signed-off-by: Ryan Tate <[email protected]>
  • Loading branch information
Ryanmtate committed Sep 20, 2024
1 parent 575df19 commit fa63be6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
9 changes: 6 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ anyhow = "1.0.75"
async-trait = "0.1.73"
base64 = "0.21.4"
http = "1.1.0"
# NOTE: ssi-jwk uses syntax_json, but does not use the `serde_json` feature for serialization/deserialization.
json-syntax = { version = "0.12.5", features = ["serde_json"] }
# # NOTE: ssi-jwk uses syntax_json, but does not use the `serde_json` feature for serialization/deserialization.
# json-syntax = { version = "0.12.5", features = ["serde_json"] }
jsonpath_lib = "0.3.0"
jsonschema = "0.18.0"
oid4vp-frontend = { version = "0.1.0", path = "oid4vp-frontend" }
Expand All @@ -27,7 +27,7 @@ reqwest = { version = "0.12.5", features = ["rustls-tls"] }
serde = "1.0.188"
serde_json = "1.0.107"
serde_urlencoded = "0.7.1"
ssi = { version = "0.8.1", features = ["secp256r1"] }
ssi = { version = "0.9", features = ["secp256r1"] }
tokio = "1.32.0"
tracing = "0.1.37"
url = { version = "2.4.1", features = ["serde"] }
Expand All @@ -43,3 +43,6 @@ uuid = { version = "1.2", features = ["v4", "serde", "js"] }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
uuid = { version = "1.2", features = ["v4", "serde"] }

[patch.crates-io]
ssi = { git = "https://github.com/spruceid/ssi.git" }
8 changes: 4 additions & 4 deletions src/verifier/request_signer.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use anyhow::Result;
use async_trait::async_trait;
use p256::ecdsa::{signature::Signer, Signature, SigningKey};
use ssi::claims::jws::{JWSSigner, JWSSignerInfo};
use ssi::claims::jws::{JwsSigner, JwsSignerInfo};
use ssi::jwk::Algorithm;

use ssi::jwk::JWK;
Expand Down Expand Up @@ -65,13 +65,13 @@ impl RequestSigner for P256Signer {
}
}

impl JWSSigner for P256Signer {
async fn fetch_info(&self) -> std::result::Result<JWSSignerInfo, ssi::claims::SignatureError> {
impl JwsSigner for P256Signer {
async fn fetch_info(&self) -> std::result::Result<JwsSignerInfo, ssi::claims::SignatureError> {
let algorithm = self.jwk.algorithm.unwrap_or(Algorithm::ES256);

let key_id = self.jwk.key_id.clone();

Ok(JWSSignerInfo { algorithm, key_id })
Ok(JwsSignerInfo { algorithm, key_id })
}

async fn sign_bytes(
Expand Down

0 comments on commit fa63be6

Please sign in to comment.