Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the msextensions build #29

Merged
merged 3 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading