Skip to content

Commit

Permalink
Reformat imports
Browse files Browse the repository at this point in the history
  • Loading branch information
justsmth committed Jan 28, 2025
1 parent fdb1e7c commit e52f8ee
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 35 deletions.
6 changes: 2 additions & 4 deletions aws-lc-rs/src/agreement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,12 @@
//! ```
mod ephemeral;

use crate::ec::encoding;
use crate::ec::encoding::sec1::{
marshal_sec1_private_key, marshal_sec1_public_point, marshal_sec1_public_point_into_buffer,
parse_sec1_private_bn,
};
use crate::ec::evp_key_generate;
use crate::error::KeyRejected;
use crate::error::Unspecified;
use crate::ec::{encoding, evp_key_generate};
use crate::error::{KeyRejected, Unspecified};
use crate::hex;
use crate::ptr::ConstPointer;
pub use ephemeral::{agree_ephemeral, EphemeralPrivateKey};
Expand Down
7 changes: 2 additions & 5 deletions aws-lc-rs/src/ec/encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,12 @@ pub(crate) mod sec1 {
EC_GROUP, EC_POINT, EVP_PKEY,
};
use crate::cbb::LcCBB;
use crate::ec::validate_evp_key;
use crate::ec::KeyRejected;
use crate::ec::{
compressed_public_key_size_bytes, ec_group_from_nid, uncompressed_public_key_size_bytes,
validate_evp_key, KeyRejected,
};
use crate::error::Unspecified;
use crate::ptr::ConstPointer;
use crate::ptr::DetachableLcPtr;
use crate::ptr::LcPtr;
use crate::ptr::{ConstPointer, DetachableLcPtr, LcPtr};
use std::ptr::{null, null_mut};

pub(crate) fn parse_sec1_public_point(
Expand Down
11 changes: 4 additions & 7 deletions aws-lc-rs/src/rsa/encoding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,11 @@ pub(in crate::rsa) mod rfc8017 {
///
/// Encodings that use the `SubjectPublicKeyInfo` structure.
pub(in crate::rsa) mod rfc5280 {
use crate::aws_lc::EVP_PKEY;
use crate::aws_lc::EVP_PKEY_RSA;
use crate::aws_lc::{EVP_PKEY, EVP_PKEY_RSA};
use crate::buffer::Buffer;
use crate::{
encoding::PublicKeyX509Der,
error::{KeyRejected, Unspecified},
ptr::LcPtr,
};
use crate::encoding::PublicKeyX509Der;
use crate::error::{KeyRejected, Unspecified};
use crate::ptr::LcPtr;

pub(in crate::rsa) fn encode_public_key_der(
key: &LcPtr<EVP_PKEY>,
Expand Down
15 changes: 5 additions & 10 deletions aws-lc-rs/src/rsa/encryption.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,13 @@
pub(super) mod oaep;
pub(super) mod pkcs1;

use super::{
encoding,
key::{generate_rsa_key, is_rsa_key},
KeySize,
};
use super::key::{generate_rsa_key, is_rsa_key};
use super::{encoding, KeySize};
use crate::aws_lc::{EVP_PKEY, EVP_PKEY_RSA};
use crate::encoding::{AsDer, Pkcs8V1Der, PublicKeyX509Der};
use crate::error::{KeyRejected, Unspecified};
use crate::pkcs8::Version;
use crate::{
encoding::{AsDer, Pkcs8V1Der, PublicKeyX509Der},
error::{KeyRejected, Unspecified},
ptr::LcPtr,
};
use crate::ptr::LcPtr;
use core::fmt::Debug;

/// RSA Encryption Algorithm Identifier
Expand Down
13 changes: 4 additions & 9 deletions aws-lc-rs/src/rsa/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@
// SPDX-License-Identifier: ISC
// Modifications copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0 OR ISC
use super::{
encoding,
signature::{compute_rsa_signature, RsaEncoding, RsaPadding},
RsaParameters,
};
use super::signature::{compute_rsa_signature, RsaEncoding, RsaPadding};
use super::{encoding, RsaParameters};
#[cfg(feature = "fips")]
use crate::aws_lc::RSA;
use crate::aws_lc::{
Expand All @@ -16,9 +13,7 @@ use crate::aws_lc::{
};
#[cfg(feature = "ring-io")]
use crate::aws_lc::{RSA_get0_e, RSA_get0_n};
use crate::digest;
use crate::encoding::AsDer;
use crate::encoding::Pkcs8V1Der;
use crate::encoding::{AsDer, Pkcs8V1Der};
use crate::fips::indicator_check;
#[cfg(feature = "ring-io")]
use crate::io;
Expand All @@ -27,7 +22,7 @@ use crate::ptr::ConstPointer;
use crate::ptr::{DetachableLcPtr, LcPtr};
use crate::rsa::PublicEncryptingKey;
use crate::sealed::Sealed;
use crate::{hex, rand};
use crate::{digest, hex, rand};
#[cfg(feature = "fips")]
use aws_lc::RSA_check_fips;
use core::fmt::{self, Debug, Formatter};
Expand Down

0 comments on commit e52f8ee

Please sign in to comment.