Skip to content

Commit d764363

Browse files
committed
remove a check that is no longer reachable
the DH params are checked in dh_parameters_from_numbers now
1 parent a81150b commit d764363

File tree

1 file changed

+0
-8
lines changed
  • src/rust/src/backend

1 file changed

+0
-8
lines changed

src/rust/src/backend/dh.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -421,14 +421,6 @@ impl DHPrivateNumbers {
421421
let priv_key = utils::py_int_to_bn(py, self.x.bind(py))?;
422422

423423
let dh = dh.set_key(pub_key, priv_key)?;
424-
if !dh.check_key()? {
425-
return Err(CryptographyError::from(
426-
pyo3::exceptions::PyValueError::new_err(
427-
"DH private numbers did not pass safety checks.",
428-
),
429-
));
430-
}
431-
432424
let pkey = openssl::pkey::PKey::from_dh(dh)?;
433425
Ok(DHPrivateKey { pkey })
434426
}

0 commit comments

Comments
 (0)