Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
cobward committed Dec 12, 2024
1 parent 556f144 commit b8c6e8e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/definitions/x509/extensions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ impl ExtensionValidator for ExtendedKeyUsageValidator {
but no other key usages are allowed */
fn validate(&self, extension: &Extension) -> Vec<Error> {
let bytes = extension.extn_value.as_bytes();
let extended_key_usage = ExtendedKeyUsage::from_der(&bytes);
let extended_key_usage = ExtendedKeyUsage::from_der(bytes);

if !extension.critical {
tracing::warn!(
Expand Down Expand Up @@ -230,7 +230,7 @@ impl ExtensionValidator for SignerKeyUsageValidator {
fn validate(&self, extension: &Extension) -> Vec<Error> {
let bytes = extension.extn_value.as_bytes();
let mut errors: Vec<Error> = vec![];
let key_usage = KeyUsage::from_der(&bytes);
let key_usage = KeyUsage::from_der(bytes);

if !extension.critical {
tracing::warn!("expected KeyUsage extension to be critical on signer certificate",)
Expand Down Expand Up @@ -344,7 +344,7 @@ impl ExtensionValidator for BasicConstraintsValidator {
}

let bytes = extension.extn_value.as_bytes();
let basic_constraints = BasicConstraints::from_der(&bytes);
let basic_constraints = BasicConstraints::from_der(bytes);
match basic_constraints {
Ok(bc) => {
if let Some(e) = Self::check(bc) {
Expand Down Expand Up @@ -376,7 +376,7 @@ impl ExtensionValidator for CrlDistributionPointsValidator {
fn validate(&self, extension: &Extension) -> Vec<Error> {
let bytes = extension.extn_value.as_bytes();
let mut errors: Vec<Error> = vec![];
let crl_distribution_point = CrlDistributionPoints::from_der(&bytes);
let crl_distribution_point = CrlDistributionPoints::from_der(bytes);
match crl_distribution_point {
Ok(crl_dp) => {
if crl_dp.0.is_empty() {
Expand Down
2 changes: 1 addition & 1 deletion src/definitions/x509/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ mod test {
Certificate,
};

fn prepare_root_certificate<'s, S>(root_key: &'s S, issuer: Name) -> CertificateBuilder<'s, S>
fn prepare_root_certificate<S>(root_key: &S, issuer: Name) -> CertificateBuilder<'_, S>
where
S: KeypairRef + DynSignatureAlgorithmIdentifier,
S::VerifyingKey: EncodePublicKey,
Expand Down
2 changes: 1 addition & 1 deletion src/presentation/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ impl SessionManager {
match x5chain {
Ok(x5c) => {
if let Some(trusted_verifiers) = &self.trusted_verifiers {
validation_errors.append(&mut x5c.validate(Some(&trusted_verifiers)));
validation_errors.append(&mut x5c.validate(Some(trusted_verifiers)));
}
}
Err(e) => {
Expand Down

0 comments on commit b8c6e8e

Please sign in to comment.