pub struct TSigner(_);
This is supported on crate feature dnssec only.
Expand description

Struct to pass to a client for it to authenticate requests using TSIG.

Implementations

Create a new Tsigner from its parts

Arguments
  • key - cryptographic key used to authenticate exchanges
  • algorithm - algorithm used to authenticate exchanges
  • signer_name - name of the key. Must match the name known to the server
  • fudge - maximum difference between client and server time, in seconds, see fudge for details

Return the key used for message authentication

Return the algorithm used for message authentication

Name of the key used by this signer

Maximum time difference between client time when issuing a message, and server time when receiving it, in second. If time is out, the server will consider the request invalid. Longer values means more room for replay by an attacker. A few minutes are usually a good value.

Compute authentication tag for a buffer

Compute authentication tag for a message

Verify hmac in constant time to prevent timing attacks

Verify the message is correctly signed This does not perform time verification on its own, instead one should verify current time lie in returned Range

Arguments
  • previous_hash - Hash of the last message received before this one, or of the query for the first message
  • message - byte buffer containing current message
  • first_message - is this the first response message
Returns

Return Ok(_) on valid signature. Inner tuple contain the following values, in order:

  • a byte buffer containing the hash of this message. Need to be passed back when authenticating next message
  • a Range of time that is acceptable
  • the time the signature was emited. It must be greater or equal to the time of previous messages, if any

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Converts to this type from the input type.

The message taken in should be processed and then return Records which should be appended to the additional section of the message. Read more

Return whether the message require futher processing before being sent By default, returns true for AXFR and IXFR queries, and Update and Notify messages Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more