View Source Baobab.Entry.Validator (Baobab v0.8.3)

Validation of Baobab.Entry structs

Link to this section Summary

Functions

Validate a Baobab.Entry struct

Validate the backlink field of a Baobab.Entry

Validate a Baobab.Entry without full certificate pool verification.

Validate the lipmaalink field of a Baobab.Entry

Validate the payload_hash field of a Baobab.Entry

Validate the sig field of a Baobab.Entry

Link to this section Functions

@spec validate(%Baobab.Entry{
  author: term(),
  backlink: term(),
  lipmaalink: term(),
  log_id: term(),
  payload: term(),
  payload_hash: term(),
  seqnum: term(),
  sig: term(),
  size: term(),
  tag: term()
}) ::
  %Baobab.Entry{
    author: term(),
    backlink: term(),
    lipmaalink: term(),
    log_id: term(),
    payload: term(),
    payload_hash: term(),
    seqnum: term(),
    sig: term(),
    size: term(),
    tag: term()
  }
  | {:error, String.t()}

Validate a Baobab.Entry struct

Includes validation of its available certificate pool

Link to this function

validate_backlink(entry)

View Source
@spec validate_backlink(%Baobab.Entry{
  author: term(),
  backlink: term(),
  lipmaalink: term(),
  log_id: term(),
  payload: term(),
  payload_hash: term(),
  seqnum: term(),
  sig: term(),
  size: term(),
  tag: term()
}) :: :ok | {:error, String.t()}

Validate the backlink field of a Baobab.Entry

@spec validate_entry(%Baobab.Entry{
  author: term(),
  backlink: term(),
  lipmaalink: term(),
  log_id: term(),
  payload: term(),
  payload_hash: term(),
  seqnum: term(),
  sig: term(),
  size: term(),
  tag: term()
}) :: :ok | {:error, String.t()}

Validate a Baobab.Entry without full certificate pool verification.

Confirms:

  • Signature
  • Payload hash
  • Backlink
  • Lipmaalink
Link to this function

validate_lipmaalink(entry)

View Source
@spec validate_lipmaalink(%Baobab.Entry{
  author: term(),
  backlink: term(),
  lipmaalink: term(),
  log_id: term(),
  payload: term(),
  payload_hash: term(),
  seqnum: term(),
  sig: term(),
  size: term(),
  tag: term()
}) :: :ok | {:error, String.t()}

Validate the lipmaalink field of a Baobab.Entry

Link to this function

validate_payload_hash(entry)

View Source
@spec validate_payload_hash(%Baobab.Entry{
  author: term(),
  backlink: term(),
  lipmaalink: term(),
  log_id: term(),
  payload: term(),
  payload_hash: term(),
  seqnum: term(),
  sig: term(),
  size: term(),
  tag: term()
}) :: :ok | {:error, String.t()}

Validate the payload_hash field of a Baobab.Entry

@spec validate_sig(%Baobab.Entry{
  author: term(),
  backlink: term(),
  lipmaalink: term(),
  log_id: term(),
  payload: term(),
  payload_hash: term(),
  seqnum: term(),
  sig: term(),
  size: term(),
  tag: term()
}) :: :ok | {:error, String.t()}

Validate the sig field of a Baobab.Entry