Fix code quality: trailing whitespace, unused imports, clippy warnings
- Fix trailing whitespace in kex.rs and s3.rs - Add missing KexProposal import in kex_complete.rs - Auto-fix clippy warnings across all crates - All 153 tests pass
This commit is contained in:
@@ -8,11 +8,11 @@ type HmacSha256 = Hmac<Sha256>;
|
||||
pub fn verify_signature(headers: HeaderMap, method: &str, path: &str) -> bool {
|
||||
// Load S3 config and check require_auth flag
|
||||
let config = crate::s3_config::S3Config::load_default().unwrap_or_default();
|
||||
|
||||
|
||||
// Merge environment variables (allows override via MB_S3_REQUIRE_AUTH)
|
||||
let mut config = config;
|
||||
config.merge_env();
|
||||
|
||||
|
||||
if !config.s3.require_auth {
|
||||
// Development mode: allow access without authentication
|
||||
return true;
|
||||
@@ -127,7 +127,7 @@ fn calculate_signature(
|
||||
headers: HeaderMap,
|
||||
method: &str,
|
||||
path: &str,
|
||||
access_key: &str,
|
||||
_access_key: &str,
|
||||
secret_key: &str,
|
||||
region: &str,
|
||||
service: &str,
|
||||
@@ -143,9 +143,9 @@ fn calculate_signature(
|
||||
let signing_key = calculate_signing_key(secret_key, date, region, service);
|
||||
|
||||
// 4. Calculate Signature
|
||||
let signature = hmac_sha256_hex(&signing_key, &string_to_sign);
|
||||
|
||||
|
||||
signature
|
||||
hmac_sha256_hex(&signing_key, &string_to_sign)
|
||||
}
|
||||
|
||||
fn create_canonical_request(headers: HeaderMap, method: &str, path: &str) -> String {
|
||||
|
||||
Reference in New Issue
Block a user