summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--openssl/src/bn.rs24
-rw-r--r--openssl/src/pkcs5.rs2
-rw-r--r--openssl/src/ssl/mod.rs10
3 files changed, 18 insertions, 18 deletions
diff --git a/openssl/src/bn.rs b/openssl/src/bn.rs
index 31a953e9..e9ed1f4d 100644
--- a/openssl/src/bn.rs
+++ b/openssl/src/bn.rs
@@ -188,7 +188,7 @@ impl BigNumRef {
/// OpenSSL documentation at [`BN_div_word`]
///
/// [`BN_div_word`]: https://www.openssl.org/docs/man1.1.0/crypto/BN_div_word.html
- #[allow(clippy::identity_conversion)]
+ #[allow(clippy::useless_conversion)]
pub fn div_word(&mut self, w: u32) -> Result<u64, ErrorStack> {
unsafe {
let r = ffi::BN_div_word(self.as_ptr(), w.into());
@@ -205,7 +205,7 @@ impl BigNumRef {
/// OpenSSL documentation at [`BN_mod_word`]
///
/// [`BN_mod_word`]: https://www.openssl.org/docs/man1.1.0/crypto/BN_mod_word.html
- #[allow(clippy::identity_conversion)]
+ #[allow(clippy::useless_conversion)]
pub fn mod_word(&self, w: u32) -> Result<u64, ErrorStack> {
unsafe {
let r = ffi::BN_mod_word(self.as_ptr(), w.into());
@@ -243,7 +243,7 @@ impl BigNumRef {
/// OpenSSL documentation at [`BN_set_bit`]
///
/// [`BN_set_bit`]: https://www.openssl.org/docs/man1.1.0/crypto/BN_set_bit.html
- #[allow(clippy::identity_conversion)]
+ #[allow(clippy::useless_conversion)]
pub fn set_bit(&mut self, n: i32) -> Result<(), ErrorStack> {
unsafe { cvt(ffi::BN_set_bit(self.as_ptr(), n.into())).map(|_| ()) }
}
@@ -255,7 +255,7 @@ impl BigNumRef {
/// OpenSSL documentation at [`BN_clear_bit`]
///
/// [`BN_clear_bit`]: https://www.openssl.org/docs/man1.1.0/crypto/BN_clear_bit.html
- #[allow(clippy::identity_conversion)]
+ #[allow(clippy::useless_conversion)]
pub fn clear_bit(&mut self, n: i32) -> Result<(), ErrorStack> {
unsafe { cvt(ffi::BN_clear_bit(self.as_ptr(), n.into())).map(|_| ()) }
}
@@ -265,7 +265,7 @@ impl BigNumRef {
/// OpenSSL documentation at [`BN_is_bit_set`]
///
/// [`BN_is_bit_set`]: https://www.openssl.org/docs/man1.1.0/crypto/BN_is_bit_set.html
- #[allow(clippy::identity_conversion)]
+ #[allow(clippy::useless_conversion)]
pub fn is_bit_set(&self, n: i32) -> bool {
unsafe { ffi::BN_is_bit_set(self.as_ptr(), n.into()) == 1 }
}
@@ -277,7 +277,7 @@ impl BigNumRef {
/// OpenSSL documentation at [`BN_mask_bits`]
///
/// [`BN_mask_bits`]: https://www.openssl.org/docs/man1.1.0/crypto/BN_mask_bits.html
- #[allow(clippy::identity_conversion)]
+ #[allow(clippy::useless_conversion)]
pub fn mask_bits(&mut self, n: i32) -> Result<(), ErrorStack> {
unsafe { cvt(ffi::BN_mask_bits(self.as_ptr(), n.into())).map(|_| ()) }
}
@@ -325,7 +325,7 @@ impl BigNumRef {
/// OpenSSL documentation at [`BN_lshift`]
///
/// [`BN_lshift`]: https://www.openssl.org/docs/man1.1.0/crypto/BN_lshift.html
- #[allow(clippy::identity_conversion)]
+ #[allow(clippy::useless_conversion)]
pub fn lshift(&mut self, a: &BigNumRef, n: i32) -> Result<(), ErrorStack> {
unsafe { cvt(ffi::BN_lshift(self.as_ptr(), a.as_ptr(), n.into())).map(|_| ()) }
}
@@ -335,7 +335,7 @@ impl BigNumRef {
/// OpenSSL documentation at [`BN_rshift`]
///
/// [`BN_rshift`]: https://www.openssl.org/docs/man1.1.0/crypto/BN_rshift.html
- #[allow(clippy::identity_conversion)]
+ #[allow(clippy::useless_conversion)]
pub fn rshift(&mut self, a: &BigNumRef, n: i32) -> Result<(), ErrorStack> {
unsafe { cvt(ffi::BN_rshift(self.as_ptr(), a.as_ptr(), n.into())).map(|_| ()) }
}
@@ -421,7 +421,7 @@ impl BigNumRef {
///
/// [`constants`]: index.html#constants
/// [`BN_rand`]: https://www.openssl.org/docs/man1.1.0/crypto/BN_rand.html
- #[allow(clippy::identity_conversion)]
+ #[allow(clippy::useless_conversion)]
pub fn rand(&mut self, bits: i32, msb: MsbOption, odd: bool) -> Result<(), ErrorStack> {
unsafe {
cvt(ffi::BN_rand(
@@ -439,7 +439,7 @@ impl BigNumRef {
/// OpenSSL documentation at [`BN_psuedo_rand`]
///
/// [`BN_psuedo_rand`]: https://www.openssl.org/docs/man1.1.0/crypto/BN_pseudo_rand.html
- #[allow(clippy::identity_conversion)]
+ #[allow(clippy::useless_conversion)]
pub fn pseudo_rand(&mut self, bits: i32, msb: MsbOption, odd: bool) -> Result<(), ErrorStack> {
unsafe {
cvt(ffi::BN_pseudo_rand(
@@ -818,7 +818,7 @@ impl BigNumRef {
/// # Return Value
///
/// Returns `true` if `self` is prime with an error probability of less than `0.25 ^ checks`.
- #[allow(clippy::identity_conversion)]
+ #[allow(clippy::useless_conversion)]
pub fn is_prime(&self, checks: i32, ctx: &mut BigNumContextRef) -> Result<bool, ErrorStack> {
unsafe {
cvt_n(ffi::BN_is_prime_ex(
@@ -844,7 +844,7 @@ impl BigNumRef {
/// # Return Value
///
/// Returns `true` if `self` is prime with an error probability of less than `0.25 ^ checks`.
- #[allow(clippy::identity_conversion)]
+ #[allow(clippy::useless_conversion)]
pub fn is_prime_fasttest(
&self,
checks: i32,
diff --git a/openssl/src/pkcs5.rs b/openssl/src/pkcs5.rs
index d21a98b1..5c25f3d1 100644
--- a/openssl/src/pkcs5.rs
+++ b/openssl/src/pkcs5.rs
@@ -23,7 +23,7 @@ pub struct KeyIvPair {
///
/// New applications should not use this and instead use
/// `pbkdf2_hmac` or another more modern key derivation algorithm.
-#[allow(clippy::identity_conversion)]
+#[allow(clippy::useless_conversion)]
pub fn bytes_to_key(
cipher: Cipher,
digest: MessageDigest,
diff --git a/openssl/src/ssl/mod.rs b/openssl/src/ssl/mod.rs
index dd4a54ba..e69b3ca5 100644
--- a/openssl/src/ssl/mod.rs
+++ b/openssl/src/ssl/mod.rs
@@ -1738,7 +1738,7 @@ impl SslContextBuilder {
/// This corresponds to [`SSL_CTX_sess_get_cache_size`].
///
/// [`SSL_CTX_sess_get_cache_size`]: https://www.openssl.org/docs/man1.0.2/man3/SSL_CTX_sess_set_cache_size.html
- #[allow(clippy::identity_conversion)]
+ #[allow(clippy::useless_conversion)]
pub fn set_session_cache_size(&mut self, size: i32) -> i64 {
unsafe { ffi::SSL_CTX_sess_set_cache_size(self.as_ptr(), size.into()).into() }
}
@@ -1980,7 +1980,7 @@ impl SslContextRef {
/// This corresponds to [`SSL_CTX_sess_get_cache_size`].
///
/// [`SSL_CTX_sess_get_cache_size`]: https://www.openssl.org/docs/man1.0.2/man3/SSL_CTX_sess_set_cache_size.html
- #[allow(clippy::identity_conversion)]
+ #[allow(clippy::useless_conversion)]
pub fn session_cache_size(&self) -> i64 {
unsafe { ffi::SSL_CTX_sess_get_cache_size(self.as_ptr()).into() }
}
@@ -2098,7 +2098,7 @@ impl SslCipherRef {
/// This corresponds to [`SSL_CIPHER_get_bits`].
///
/// [`SSL_CIPHER_get_bits`]: https://www.openssl.org/docs/manmaster/man3/SSL_CIPHER_get_name.html
- #[allow(clippy::identity_conversion)]
+ #[allow(clippy::useless_conversion)]
pub fn bits(&self) -> CipherBits {
unsafe {
let mut algo_bits = 0;
@@ -2257,7 +2257,7 @@ impl SslSessionRef {
/// This corresponds to [`SSL_SESSION_get_time`].
///
/// [`SSL_SESSION_get_time`]: https://www.openssl.org/docs/man1.1.1/man3/SSL_SESSION_get_time.html
- #[allow(clippy::identity_conversion)]
+ #[allow(clippy::useless_conversion)]
pub fn time(&self) -> i64 {
unsafe { ffi::SSL_SESSION_get_time(self.as_ptr()).into() }
}
@@ -2269,7 +2269,7 @@ impl SslSessionRef {
/// This corresponds to [`SSL_SESSION_get_timeout`].
///
/// [`SSL_SESSION_get_timeout`]: https://www.openssl.org/docs/man1.1.1/man3/SSL_SESSION_get_time.html
- #[allow(clippy::identity_conversion)]
+ #[allow(clippy::useless_conversion)]
pub fn timeout(&self) -> i64 {
unsafe { ffi::SSL_SESSION_get_timeout(self.as_ptr()).into() }
}