mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
rust: Fix cargo clippy and cargo doc findings
Fix the new `cargo clippy` and `cargo doc` findings that were triggered with the recent policy addition. Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com> Reviewed-by: Steffen Eiden <seiden@linux.ibm.com> Signed-off-by: Steffen Eiden <seiden@linux.ibm.com>
This commit is contained in:
committed by
Steffen Eiden
parent
2155b83c1f
commit
667a8d714b
@@ -77,7 +77,7 @@ impl X509StoreContextExtension for X509StoreContextRef {
|
||||
{
|
||||
struct Cleanup<'a>(&'a mut X509StoreContextRef);
|
||||
|
||||
impl<'a> Drop for Cleanup<'a> {
|
||||
impl Drop for Cleanup<'_> {
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
openssl_sys::X509_STORE_CTX_cleanup(self.0.as_ptr());
|
||||
|
||||
@@ -63,7 +63,7 @@ impl Stackable for StackableX509Crl {
|
||||
}
|
||||
|
||||
pub struct MemBioSlice<'a>(*mut openssl_sys::BIO, PhantomData<&'a [u8]>);
|
||||
impl<'a> Drop for MemBioSlice<'a> {
|
||||
impl Drop for MemBioSlice<'_> {
|
||||
fn drop(&mut self) {
|
||||
unsafe {
|
||||
openssl_sys::BIO_free_all(self.0);
|
||||
|
||||
+1
-1
@@ -288,7 +288,7 @@ impl EcPubKeyCoord {
|
||||
hash(MessageDigest::sha256(), self.as_ref())
|
||||
}
|
||||
|
||||
/// Construct a [``EcPubKeyCoord]
|
||||
/// Construct a [`EcPubKeyCoord`]
|
||||
///
|
||||
/// # Safety
|
||||
/// This function is marked unsafe, because data not representing two EC points violates the
|
||||
|
||||
@@ -168,7 +168,7 @@ impl CertVerifier {
|
||||
/// * `crl_paths` - Paths to certificate revocation lists for the chain of trust
|
||||
/// * `root_ca_path` - Path to the root of trust
|
||||
/// * `offline` - if set to true the verification process will not try to download CRLs from the
|
||||
/// internet.
|
||||
/// internet.
|
||||
///
|
||||
/// # Errors
|
||||
///
|
||||
|
||||
@@ -25,7 +25,7 @@ use std::str::from_utf8;
|
||||
use std::{cmp::Ordering, ffi::c_int};
|
||||
|
||||
/// Minimum security level for the keys/certificates used to establish a chain of
|
||||
/// trust (see https://www.openssl.org/docs/man1.1.1/man3/X509_VERIFY_PARAM_set_auth_level.html
|
||||
/// trust (see <https://www.openssl.org/docs/man1.1.1/man3/X509_VERIFY_PARAM_set_auth_level.html>
|
||||
/// for details).
|
||||
const SECURITY_LEVEL: usize = 2;
|
||||
const SECURITY_BITS_ARRAY: [u32; 6] = [0, 80, 112, 128, 192, 256];
|
||||
@@ -213,7 +213,7 @@ fn is_ibm_signing_cert(cert: &X509) -> bool {
|
||||
return false;
|
||||
}
|
||||
|
||||
return match subj.entries_by_nid(Nid::ORGANIZATIONALUNITNAME).next() {
|
||||
match subj.entries_by_nid(Nid::ORGANIZATIONALUNITNAME).next() {
|
||||
None => false,
|
||||
Some(entry) => match entry.data().as_utf8() {
|
||||
Err(_) => false,
|
||||
@@ -221,7 +221,7 @@ fn is_ibm_signing_cert(cert: &X509) -> bool {
|
||||
.as_bytes()
|
||||
.ends_with(IBM_Z_ORGANIZATIONAL_UNIT_NAME_SUFFIX.as_bytes()),
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
fn get_ibm_z_sign_key(certs: &[X509]) -> Result<X509> {
|
||||
|
||||
Reference in New Issue
Block a user