Skip to content

Commit

Permalink
Merge pull request #9 from Devolutions/jwt-api-update
Browse files Browse the repository at this point in the history
JWT API update
  • Loading branch information
Benoît C authored Dec 23, 2019
2 parents 27325c2 + d7b2eb2 commit 9a1160e
Show file tree
Hide file tree
Showing 10 changed files with 427 additions and 218 deletions.
26 changes: 8 additions & 18 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ members = [
"picky-server",
"picky-asn1",
"picky-asn1-der",
]
]

[patch.crates-io]
backtrace = { git = "https://github.com/Devolutions/backtrace-rs", branch = "wayk" }
libz-sys = { git = "https://github.com/Devolutions/libz-sys", branch = "wayk" }
4 changes: 2 additions & 2 deletions ci/azure-pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ jobs:
- powershell: |
conan install openssl/$(OPENSSL_VERSION)@devolutions/stable -g virtualenv -pr windows-x86_64
.\activate.ps1
cargo build --release
cargo build --release --target=x86_64-pc-windows-msvc
mkdir $(Build.ArtifactStagingDirectory)/windows/x86_64
cp $(Build.Repository.LocalPath)/target/release/picky-server.exe $(Build.ArtifactStagingDirectory)/windows/x86_64/
cp $(Build.Repository.LocalPath)/target/x86_64-pc-windows-msvc/release/picky-server.exe $(Build.ArtifactStagingDirectory)/windows/x86_64/
displayName: Building picky-rs
env:
RUSTFLAGS: '-C target-feature=+crt-static'
Expand Down
2 changes: 1 addition & 1 deletion picky/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "picky"
version = "4.2.1"
version = "4.4.2"
authors = [
"jtrepanier-devolutions <[email protected]>",
"Benoît CORTIER <[email protected]>",
Expand Down
4 changes: 2 additions & 2 deletions picky/src/jose/jwk.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::{
key::{OwnedPublicKey, PublicKey},
key::PublicKey,
private::SubjectPublicKeyInfo,
signature::SignatureHashType,
};
Expand Down Expand Up @@ -177,7 +177,7 @@ impl Jwk {
Ok(serde_json::to_string_pretty(self)?)
}

pub fn to_public_key(&self) -> Result<OwnedPublicKey, JwkError> {
pub fn to_public_key(&self) -> Result<PublicKey, JwkError> {
match &self.key {
JwkKeyType::Rsa(rsa) => {
let spki = SubjectPublicKeyInfo::new_rsa_key(rsa.modulus()?.into(), rsa.public_exponent()?.into());
Expand Down
Loading

0 comments on commit 9a1160e

Please sign in to comment.