mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-04 04:17:44 +00:00
bd571a575f
* fix(io-core,signer): replace unwrap() with proper error handling ## io-core (issue #653 item 1) - pool.rs: replace 8 .lock().unwrap() with poisoned recovery - pool.rs: replace semaphore acquire unwrap with graceful fallback - deadlock_detector.rs: replace 5 .lock().unwrap() with match/ok ## signer (issue #653 item 1) - Add SignV2Error enum, try_pre_sign_v2, try_sign_v2 - Replace 14 unwrap() in v2 signing with ? propagation - Add try_streaming_sign_v4, replace 5 expect("err") with descriptive errors - get_host_addr returns Result instead of panicking All backward-compat wrappers preserved. 95 io-core + 18 signer tests pass. * fix: address signer and pool review comments * test: update signer v2 string-to-sign test * fix: address signer and pool review followups * fix: tighten signer host and pool fallback
36 lines
1.4 KiB
Rust
36 lines
1.4 KiB
Rust
// Copyright 2024 RustFS Team
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
pub mod constants;
|
|
pub mod request_signature_streaming;
|
|
pub mod request_signature_streaming_unsigned_trailer;
|
|
pub mod request_signature_v2;
|
|
pub mod request_signature_v4;
|
|
pub mod utils;
|
|
|
|
pub use request_signature_streaming::streaming_sign_v4;
|
|
pub use request_signature_streaming::try_streaming_sign_v4;
|
|
pub use request_signature_v2::SignV2Error;
|
|
pub use request_signature_v2::pre_sign_v2;
|
|
pub use request_signature_v2::sign_v2;
|
|
pub use request_signature_v2::try_pre_sign_v2;
|
|
pub use request_signature_v2::try_sign_v2;
|
|
pub use request_signature_v4::SignV4Error;
|
|
pub use request_signature_v4::pre_sign_v4;
|
|
pub use request_signature_v4::sign_v4;
|
|
pub use request_signature_v4::sign_v4_trailer;
|
|
pub use request_signature_v4::try_pre_sign_v4;
|
|
pub use request_signature_v4::try_sign_v4;
|
|
pub use request_signature_v4::try_sign_v4_trailer;
|