Skip to content

Commit

Permalink
bump ssi to 0.9 (#21)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Tate <[email protected]>
  • Loading branch information
Ryanmtate authored Sep 24, 2024
1 parent 575df19 commit dc4e460
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 1 addition & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ 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"] }
jsonpath_lib = "0.3.0"
jsonschema = "0.18.0"
oid4vp-frontend = { version = "0.1.0", path = "oid4vp-frontend" }
Expand All @@ -27,7 +25,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 Down
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 dc4e460

Please sign in to comment.