2017-06-17 18:06:39 +02:00
|
|
|
|
|
|
|
-record(challenge, {
|
2017-07-03 12:37:32 +02:00
|
|
|
type = <<"http-01">> :: bitstring(),
|
|
|
|
status = pending :: pending | valid | invalid,
|
|
|
|
uri = "" :: url(),
|
|
|
|
token = <<"">> :: bitstring()
|
|
|
|
}).
|
|
|
|
|
|
|
|
-record(data_acc, {
|
2017-11-14 13:12:33 +01:00
|
|
|
id :: list(),
|
|
|
|
ca_url :: url(),
|
|
|
|
key :: jose_jwk:key()
|
2017-07-03 12:37:32 +02:00
|
|
|
}).
|
2017-07-29 18:10:06 +02:00
|
|
|
-type data_acc() :: #data_acc{}.
|
2017-07-03 12:37:32 +02:00
|
|
|
|
2017-07-18 12:28:44 +02:00
|
|
|
-record(data_cert, {
|
2017-07-27 17:25:44 +02:00
|
|
|
domain :: bitstring(),
|
2017-07-29 18:10:06 +02:00
|
|
|
pem :: pem(),
|
|
|
|
path :: string()
|
2017-07-18 12:28:44 +02:00
|
|
|
}).
|
2017-07-29 18:10:06 +02:00
|
|
|
-type data_cert() :: #data_cert{}.
|
2017-07-17 08:35:37 +02:00
|
|
|
|
2017-07-29 18:10:06 +02:00
|
|
|
%%
|
|
|
|
%% Types
|
|
|
|
%%
|
2017-06-17 18:06:39 +02:00
|
|
|
|
2017-11-14 13:12:33 +01:00
|
|
|
%% Acme configuration
|
|
|
|
-type acme_config() :: [{ca_url, url()} | {contact, bitstring()}].
|
|
|
|
|
2017-07-29 18:10:06 +02:00
|
|
|
%% The main data type that ejabberd_acme keeps
|
|
|
|
-type acme_data() :: proplist().
|
2017-07-17 08:35:37 +02:00
|
|
|
|
2017-07-29 18:10:06 +02:00
|
|
|
%% The list of certificates kept in data
|
|
|
|
-type data_certs() :: proplist(bitstring(), data_cert()).
|
|
|
|
|
|
|
|
%% The certificate saved in pem format
|
|
|
|
-type pem() :: bitstring().
|
2017-07-17 08:35:37 +02:00
|
|
|
|
2017-06-17 18:06:39 +02:00
|
|
|
-type nonce() :: string().
|
|
|
|
-type url() :: string().
|
|
|
|
-type proplist() :: [{_, _}].
|
2017-07-29 18:10:06 +02:00
|
|
|
-type proplist(X,Y) :: [{X,Y}].
|
2017-07-03 12:37:32 +02:00
|
|
|
-type dirs() :: #{string() => url()}.
|
2017-06-17 18:06:39 +02:00
|
|
|
-type jws() :: map().
|
|
|
|
-type handle_resp_fun() :: fun(({ok, proplist(), proplist()}) -> {ok, _, nonce()}).
|
|
|
|
|
|
|
|
-type acme_challenge() :: #challenge{}.
|
2017-07-07 16:37:44 +02:00
|
|
|
|
2017-07-29 18:10:06 +02:00
|
|
|
%% Options
|
2017-07-07 16:37:44 +02:00
|
|
|
-type account_opt() :: string().
|
2017-07-29 18:10:06 +02:00
|
|
|
-type verbose_opt() :: string().
|
2017-08-10 14:26:35 +02:00
|
|
|
-type domains_opt() :: string().
|
2017-07-07 16:37:44 +02:00
|
|
|
|