Liking cljdoc? Tell your friends :D

roughtime-protocol.server


batch-respondclj

(batch-respond request-batch
               cert-map
               &
               {:keys [min-size-bytes]
                :or {min-size-bytes config/min-msg-size}})

Respond to a batch of RoughTime requests, which may ask for different versions.

ARGS

  • request-batch - vec of full request bytes (packet or message, depending on version).
  • :cert-map - a map containing:
    • :online-prv!! ↦ online private key
    • {every supported version} ↦ DELE cert compatible with that version

Returns a vec of responses matching the order of requests. Invalid or unsupported requests receive a nil response.

NOTE: versions 1 & 2 of the IETF protocal cannot be batched. They receive nil responses from this function.

Respond to a batch of RoughTime requests, which may ask for different versions.

ARGS

 * `request-batch` - vec of full request bytes (packet or message, depending on version).
 * :cert-map - a map containing:
   - `:online-prv!!` ↦ online private key
   - {every supported version} ↦ DELE cert compatible with that version

Returns a vec of responses matching the order of requests.  Invalid or unsupported
requests receive a `nil` response.

NOTE: versions 1 & 2 of the IETF protocal cannot be batched.  They receive nil responses
from this function.
sourceraw docstring

batch-respond--single-versionclj

(batch-respond--single-version version parsed-request-batch cert-map)
source

mint-new-certificate-mapclj

(mint-new-certificate-map lt-prv!!
                          &
                          {:keys [expires-in-seconds]
                           :or {expires-in-seconds 3600}})

Makes a new online keypair and mints DELE certificates compatible with different versions of the protocol. Returns a map with keys :online-prv!! ↦ online private key {every supported version} ↦ DELE cert compatible with that version

Makes a new online keypair and mints DELE certificates compatible with
different versions of the protocol.  Returns a map with keys
  `:online-prv!!` ↦ online private key
  {every supported version} ↦ DELE cert compatible with that version
sourceraw docstring

respondclj

(respond {:keys [request-bytes cert-map min-size-bytes]
          :or {min-size-bytes config/min-msg-size}})

Respond to a single RoughTime request.

Depending on the version, this is either a full Roughtime packet (with ROUGHTIM header), or a bare RoughTime message.

ARGS

:request-bytes - the full request (packet or message, depending on version). :cert-map - a map containing:

  • :online-prv!! ↦ online private key
  • {every supported version} ↦ DELE cert compatible with that version

Returns bytes on success; otherwise throws.

Respond to a single RoughTime request.

Depending on the version, this is either a full Roughtime **packet**
(with ROUGHTIM header), or a bare RoughTime **message**.

ARGS

 :request-bytes - the full request (packet or message, depending on version).
 :cert-map - a map containing:
   - `:online-prv!!` ↦ online private key
   - {every supported version} ↦ DELE cert compatible with that version

Returns bytes on success; otherwise throws.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close