Skip to content

Commit

Permalink
fixes #10237 -- correct EC sign parameter name (#10239) (#10240)
Browse files Browse the repository at this point in the history
Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
  • Loading branch information
reaperhulk and alex authored Jan 23, 2024
1 parent 4e64baf commit 12f038b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/rust/src/backend/ec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,9 @@ impl ECPrivateKey {
&self,
py: pyo3::Python<'p>,
data: &[u8],
algorithm: &pyo3::PyAny,
signature_algorithm: &pyo3::PyAny,
) -> CryptographyResult<&'p pyo3::types::PyBytes> {
if !algorithm.is_instance(types::ECDSA.get(py)?)? {
if !signature_algorithm.is_instance(types::ECDSA.get(py)?)? {
return Err(CryptographyError::from(
exceptions::UnsupportedAlgorithm::new_err((
"Unsupported elliptic curve signature algorithm",
Expand All @@ -283,7 +283,7 @@ impl ECPrivateKey {
let (data, _) = utils::calculate_digest_and_algorithm(
py,
data,
algorithm.getattr(pyo3::intern!(py, "algorithm"))?,
signature_algorithm.getattr(pyo3::intern!(py, "algorithm"))?,
)?;

let mut signer = openssl::pkey_ctx::PkeyCtx::new(&self.pkey)?;
Expand Down

0 comments on commit 12f038b

Please sign in to comment.