Module p1_acme

Copyright © (C) 2002-2021 ProcessOne, SARL. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. -------------------------------------------------------------------

Authors: Evgeny Khramtsov (ekhramtsov@process-one.net).

Data Types

bad_cert_reason()

bad_cert_reason() = cert_expired | invalid_issuer | invalid_signature | name_not_permitted | missing_basic_constraint | invalid_key_usage | selfsigned_peer | unknown_ca | empty_chain | key_mismatch

cert()

cert() = #'OTPCertificate'{}

cert_type()

cert_type() = ec | rsa

challenge_data()

challenge_data() = [#{domain := domain(), token := binary(), key := binary()}]

challenge_fun()

challenge_fun() = fun((challenge_data()) -> any())

challenge_type()

challenge_type() = 'http-01'

debug_fun()

debug_fun() = fun((string(), list()) -> term())

domain()

domain() = string()

UTF-8 charlist()

error_reason()

error_reason() = {codec_error, yconf:error_reason(), yconf:ctx(), map()} | {http_error, term()} | {challenge_failed, domain(), undefined | p1_acme_codec:err_obj()} | {unsupported_challenges, domain(), [string()]} | {bad_pem, string()} | {bad_der, string()} | {bad_json, binary()} | {bad_cert, bad_cert_reason()} | {problem_report, p1_acme_codec:err_obj()}

error_return()

error_return() = {error, error_reason()}

issue_option()

issue_option() = {contact, [binary() | string()]} | {cert_type, cert_type()} | {cert_key, priv_key()} | {ca_certs, [cert()]} | {challenge_type, challenge_type()} | {challenge_fun, challenge_fun()} | option()

issue_return()

issue_return() = {ok, #{acc_key := priv_key(), cert_key := priv_key(), cert_chain := [cert(), ...], validation_result => valid | {bad_cert, bad_cert_reason()}}} | error_return()

option()

option() = {timeout, pos_integer()} | {debug_fun, debug_fun()}

priv_key()

priv_key() = public_key:private_key()

revoke_option()

revoke_option() = option()

revoke_return()

revoke_return() = ok | error_return()

Function Index

format_error/1
generate_csr/2
generate_key/1
issue/2
issue/3
issue/4
revoke/3
revoke/4
start/0
stop/0

Function Details

format_error/1

format_error(Other::error_reason()) -> string()

generate_csr/2

generate_csr(Domains::[domain(), ...], PrivKey::priv_key()) -> #'CertificationRequest'{}

generate_key/1

generate_key(X1::cert_type()) -> priv_key()

issue/2

issue(DirURL::binary() | string(), Domains::[domain()]) -> issue_return()

issue/3

issue(DirURL::binary() | string(), Domains::[domain()], Opts::priv_key() | [issue_option()]) -> issue_return()

issue/4

issue(DirURL::binary() | string(), Domains::[domain()], AccKey::priv_key(), Opts::[issue_option()]) -> issue_return()

revoke/3

revoke(DirURL::binary() | string(), Cert::cert(), CertKey::priv_key()) -> revoke_return()

revoke/4

revoke(DirURL::binary() | string(), Cert::cert(), CertKey::priv_key(), Opts::[revoke_option()]) -> revoke_return()

start/0

start() -> any()

stop/0

stop() -> any()


Generated by EDoc