A time-stamp response, the TimeStampResp of RFC 3161 (2.4.2), as
Tspex.decode_response/2 reads it. Reading only parses: a rejection is a
valid response, with token: nil, and it is Tspex.verify/3 that turns
it into an error.
Fields:
:status-:granted,:granted_with_mods,:rejection,:waiting,:revocation_warningor:revocation_notification.:status_text- thestatusString, a list of strings;[]when absent.:fail_info- the bits offailInfo, as:bad_alg,:bad_request,:bad_data_format,:time_not_available,:unaccepted_policy,:unaccepted_extension,:add_info_not_availableor:system_failure; a bit RFC 3161 does not define is{:unknown_bit, n}.[]when absent.:token- theTimeStampToken(aContentInfo) as received, in the bytes of the response;nilwhen there is none.:deviations- what was tolerated against the RFC.
Summary
Types
A PKIFailureInfo bit; a bit this library does not know is {:unknown_bit, n}.
The PKIStatus of a response.
A TimeStampResp: the status, its texts and failure bits, and the token if any.
Types
@type fail_info() :: :bad_alg | :bad_request | :bad_data_format | :time_not_available | :unaccepted_policy | :unaccepted_extension | :add_info_not_available | :system_failure | {:unknown_bit, non_neg_integer()}
A PKIFailureInfo bit; a bit this library does not know is {:unknown_bit, n}.
@type status() ::
:granted
| :granted_with_mods
| :rejection
| :waiting
| :revocation_warning
| :revocation_notification
The PKIStatus of a response.
@type t() :: %Tspex.Response{ deviations: [atom()], fail_info: [fail_info()], status: status(), status_text: [String.t()], token: binary() | nil }
A TimeStampResp: the status, its texts and failure bits, and the token if any.