Skip to content

Commit

Permalink
Merge branch 'master' of github.com:jedisct1/rust-jwt-simple
Browse files Browse the repository at this point in the history
* 'master' of github.com:jedisct1/rust-jwt-simple:
  RSA-PSS: use new_pss_with_salt() instead of new_pss()
  • Loading branch information
jedisct1 committed Jul 14, 2023
2 parents c97d66b + a2f97d7 commit 26f348f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/algorithms/rsa.rs
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ impl RSAKeyPairLike for PS256KeyPair {
}

fn padding_scheme(&self) -> rsa::PaddingScheme {
rsa::PaddingScheme::new_pss::<SHA256>()
rsa::PaddingScheme::new_pss_with_salt::<SHA256>(256 / 8)
}
}

Expand Down Expand Up @@ -805,7 +805,7 @@ impl RSAPublicKeyLike for PS256PublicKey {
}

fn padding_scheme(&self) -> rsa::PaddingScheme {
rsa::PaddingScheme::new_pss::<SHA256>()
rsa::PaddingScheme::new_pss_with_salt::<SHA256>(256 / 8)
}

fn public_key(&self) -> &RSAPublicKey {
Expand Down Expand Up @@ -902,7 +902,7 @@ impl RSAKeyPairLike for PS512KeyPair {
}

fn padding_scheme(&self) -> rsa::PaddingScheme {
rsa::PaddingScheme::new_pss::<SHA512>()
rsa::PaddingScheme::new_pss_with_salt::<SHA512>(512 / 8)
}
}

Expand Down Expand Up @@ -959,7 +959,7 @@ impl RSAPublicKeyLike for PS512PublicKey {
}

fn padding_scheme(&self) -> rsa::PaddingScheme {
rsa::PaddingScheme::new_pss::<SHA512>()
rsa::PaddingScheme::new_pss_with_salt::<SHA512>(512 / 8)
}

fn public_key(&self) -> &RSAPublicKey {
Expand Down Expand Up @@ -1064,7 +1064,7 @@ impl RSAKeyPairLike for PS384KeyPair {
}

fn padding_scheme(&self) -> rsa::PaddingScheme {
rsa::PaddingScheme::new_pss::<SHA384>()
rsa::PaddingScheme::new_pss_with_salt::<SHA384>(384 / 8)
}
}

Expand Down Expand Up @@ -1121,7 +1121,7 @@ impl RSAPublicKeyLike for PS384PublicKey {
}

fn padding_scheme(&self) -> rsa::PaddingScheme {
rsa::PaddingScheme::new_pss::<SHA384>()
rsa::PaddingScheme::new_pss_with_salt::<SHA384>(384 / 8)
}

fn public_key(&self) -> &RSAPublicKey {
Expand Down

0 comments on commit 26f348f

Please sign in to comment.