SSL.Protocol.Transcript (ex_ssl v0.16.7)

Copy Markdown View Source

Immutable storage and hashing for exact encoded TLS handshake messages.

Messages are retained as reversed iodata chunks so appending does not flatten or repeatedly copy the transcript.

Summary

Types

hash()

@type hash() :: :sha256 | :sha384

t()

@type t() :: %SSL.Protocol.Transcript{
  hash: hash(),
  length: non_neg_integer(),
  messages: [iodata()]
}

Functions

append(transcript, encoded_handshake)

@spec append(t(), iodata()) :: t()

apply_hello_retry_request_rewrite(transcript)

@spec apply_hello_retry_request_rewrite(t()) :: %SSL.Protocol.Transcript{
  hash: :sha256 | :sha384,
  length: non_neg_integer(),
  messages: [<<_::32, _::_*8>>, ...]
}

checkpoint(transcript)

@spec checkpoint(t()) :: t()

digest(transcript)

@spec digest(t()) :: binary()

new(hash)

@spec new(hash()) :: %SSL.Protocol.Transcript{
  hash: :sha256 | :sha384,
  length: 0,
  messages: []
}