From 3abe3aeeecc8043e61a8068d535120d274c68ac2 Mon Sep 17 00:00:00 2001 From: Konstantinos Kallas Date: Sat, 29 Jul 2017 19:10:06 +0300 Subject: Finish revoke_certificate and add specs 1. Add a try catch in the final revoke_certificate function 2. Also delete the certificate from persistent memory when it is done revoked --- include/ejabberd_acme.hrl | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/ejabberd_acme.hrl b/include/ejabberd_acme.hrl index ef6afe601..4ef3bedbe 100644 --- a/include/ejabberd_acme.hrl +++ b/include/ejabberd_acme.hrl @@ -10,25 +10,40 @@ id :: list(), key :: jose_jwk:key() }). +-type data_acc() :: #data_acc{}. -record(data_cert, { domain :: bitstring(), - pem :: bitstring(), - path :: bitstring() + pem :: pem(), + path :: string() }). +-type data_cert() :: #data_cert{}. +%% +%% Types +%% +%% The main data type that ejabberd_acme keeps +-type acme_data() :: proplist(). +%% The list of certificates kept in data +-type data_certs() :: proplist(bitstring(), data_cert()). + +%% The certificate saved in pem format +-type pem() :: bitstring(). -type nonce() :: string(). -type url() :: string(). -type proplist() :: [{_, _}]. +-type proplist(X,Y) :: [{X,Y}]. -type dirs() :: #{string() => url()}. -type jws() :: map(). -type handle_resp_fun() :: fun(({ok, proplist(), proplist()}) -> {ok, _, nonce()}). -type acme_challenge() :: #challenge{}. +%% Options -type account_opt() :: string(). +-type verbose_opt() :: string(). + --type pem_certificate() :: bitstring(). -- cgit v1.2.3