Move remaining customizations to new file (#473)
This commit is contained in:
28
src/env/test/customization.rs
vendored
28
src/env/test/customization.rs
vendored
@@ -14,7 +14,11 @@ pub struct TestCustomization {
|
||||
pub max_pin_retries: u8,
|
||||
pub use_batch_attestation: bool,
|
||||
pub use_signature_counter: bool,
|
||||
pub max_cred_blob_length: usize,
|
||||
pub max_credential_count_in_list: Option<usize>,
|
||||
pub max_large_blob_array_size: usize,
|
||||
pub max_rp_ids_length: usize,
|
||||
pub max_supported_resident_keys: usize,
|
||||
}
|
||||
|
||||
impl Customization for TestCustomization {
|
||||
@@ -62,9 +66,25 @@ impl Customization for TestCustomization {
|
||||
self.use_signature_counter
|
||||
}
|
||||
|
||||
fn max_cred_blob_length(&self) -> usize {
|
||||
self.max_cred_blob_length
|
||||
}
|
||||
|
||||
fn max_credential_count_in_list(&self) -> Option<usize> {
|
||||
self.max_credential_count_in_list
|
||||
}
|
||||
|
||||
fn max_large_blob_array_size(&self) -> usize {
|
||||
self.max_large_blob_array_size
|
||||
}
|
||||
|
||||
fn max_rp_ids_length(&self) -> usize {
|
||||
self.max_rp_ids_length
|
||||
}
|
||||
|
||||
fn max_supported_resident_keys(&self) -> usize {
|
||||
self.max_supported_resident_keys
|
||||
}
|
||||
}
|
||||
|
||||
impl From<CustomizationImpl> for TestCustomization {
|
||||
@@ -80,7 +100,11 @@ impl From<CustomizationImpl> for TestCustomization {
|
||||
max_pin_retries,
|
||||
use_batch_attestation,
|
||||
use_signature_counter,
|
||||
max_cred_blob_length,
|
||||
max_credential_count_in_list,
|
||||
max_large_blob_array_size,
|
||||
max_rp_ids_length,
|
||||
max_supported_resident_keys,
|
||||
} = c;
|
||||
|
||||
let default_min_pin_length_rp_ids = default_min_pin_length_rp_ids
|
||||
@@ -104,7 +128,11 @@ impl From<CustomizationImpl> for TestCustomization {
|
||||
max_pin_retries,
|
||||
use_batch_attestation,
|
||||
use_signature_counter,
|
||||
max_cred_blob_length,
|
||||
max_credential_count_in_list,
|
||||
max_large_blob_array_size,
|
||||
max_rp_ids_length,
|
||||
max_supported_resident_keys,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user