pub struct ClientConfig {
pub client_sap: u8,
pub system_title: Option<SystemTitle>,
pub mechanism: AuthMechanism,
pub password: Option<Secret>,
pub security: SecurityPolicy,
pub max_pdu_size: u16,
pub conformance: Conformance,
pub referencing: Referencing,
pub challenge_len: usize,
pub invocation_counter: u32,
pub replay_window: u32,
pub gbt_window: u8,
}Expand description
How the client identifies itself and what it demands.
Fields§
§client_sap: u8The client service access point: 0x10 public, 0x20 reader, 0x30 management.
system_title: Option<SystemTitle>The client’s system title. Required for GMAC authentication and for any ciphered association, because it is half of every nonce the client sends under.
mechanism: AuthMechanismWhich authentication mechanism to propose.
password: Option<Secret>The low-level-security password, or the high-level-security shared secret.
security: SecurityPolicyWhat protection to apply.
Set dedicated to propose a dedicated-key association; the key itself comes from
the provider, and an association is refused rather than opened if the provider
has none.
max_pdu_size: u16The largest APDU the client will accept.
conformance: ConformanceWhat the client proposes it can do.
referencing: ReferencingHow objects are addressed.
challenge_len: usizeHow long a challenge to send. The Blue Book allows eight to sixty-four bytes; shorter is weaker and there is no reason to go below sixteen.
invocation_counter: u32The last invocation counter this client used before it started.
Zero is right only for a client that has never sent under these keys. Restarting
from zero against an unchanged key reuses every nonce it used before, and a
repeated GCM nonce leaks the authentication subkey. Persist
ClientSession::invocation_counter and restore it here.
replay_window: u32How far out of order the server’s invocation counters may arrive.
Zero — strictly increasing — is right for HDLC and TCP.
gbt_window: u8How many general-block-transfer blocks this client takes before it acknowledges,
announced to the server in every acknowledgement. Clamped to 1..=63.
Larger windows cost fewer round trips on a slow link and need nothing more: the blocks land in the caller’s buffer whatever the window.