Skip to content

Commit

Permalink
Merge pull request #29 from dmulder/dmulder/msextensions_build_fix
Browse files Browse the repository at this point in the history
Fix the msextensions build
  • Loading branch information
yaleman authored Apr 10, 2024
2 parents bcee118 + 16de546 commit 180962b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/rust_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ jobs:
- name: Cargo test
run: cargo test


- name: Cargo test with MS Extensions
run: cargo test --features msextensions
4 changes: 4 additions & 0 deletions src/crypto/ms_oapxbc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,10 @@ impl JwsSigner for MsOapxbcSessionKeyHs256 {
JwsSigner::get_kid(&self.hmac_key)
}

fn get_legacy_kid(&self) -> &str {
JwsSigner::get_kid(&self.hmac_key)
}

fn update_header(&self, header: &mut ProtectedHeader) -> Result<(), JwtError> {
let ctx = general_purpose::STANDARD.encode(self.nonce);
header.ctx = Some(ctx);
Expand Down
2 changes: 1 addition & 1 deletion src/jws.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl JwsBuilder {
self
}

#[cfg(test)]
/// Set the kid (required for Windows Hello/MS Extensions)
pub fn set_kid(mut self, kid: Option<&str>) -> Self {
self.header.kid = kid.map(|s| s.to_string());
self
Expand Down

0 comments on commit 180962b

Please sign in to comment.