|
CCF
|
#include <acme_client.h>
Inherited by ccf::ACMEClient.
Classes | |
| struct | Challenge |
| struct | ChallengeWaitMsg |
| struct | FinalizationWaitMsg |
| class | JWK |
| class | JWS |
| struct | Order |
Public Member Functions | |
| Client (const ClientConfig &config, std::shared_ptr< ccf::crypto::KeyPair > account_key_pair=nullptr) | |
| virtual | ~Client () |
| void | get_certificate (std::shared_ptr< ccf::crypto::KeyPair > service_key_, bool override_time=false) |
| void | start_challenge (const std::string &token) |
| virtual void | set_account_key (std::shared_ptr< ccf::crypto::KeyPair > new_account_key_pair) |
| bool | has_active_orders () const |
Protected Types | |
| enum | OrderStatus { ACTIVE , FINISHED , FAILED } |
Protected Member Functions | |
| virtual void | on_challenge (const std::string &token, const std::string &response)=0 |
| virtual void | on_challenge_finished (const std::string &token)=0 |
| virtual void | on_certificate (const std::string &certificate)=0 |
| virtual void | on_http_request (const http::URL &url, http::Request &&req, std::function< bool(http_status status, ccf::http::HeaderMap &&, std::vector< uint8_t > &&)> callback)=0 |
| void | make_request (llhttp_method method, const http::URL &url, const std::vector< uint8_t > &body, http_status expected_status, std::function< bool(const ccf::http::HeaderMap &, const std::vector< uint8_t > &)> ok_callback) |
| void | make_json_request (llhttp_method method, const http::URL &url, const std::vector< uint8_t > &body, http_status expected_status, std::function< void(const ccf::http::HeaderMap &headers, const nlohmann::json &)> ok_callback) |
| void | post_as_get (const std::string &account_url, const std::string &resource_url, std::function< bool(const ccf::http::HeaderMap &, const std::vector< uint8_t > &)> ok_callback) |
| void | post_as_get_json (const std::string &account_url, const std::string &resource_url, std::function< bool(const ccf::http::HeaderMap &, const nlohmann::json &)> ok_callback, bool empty_payload=false) |
| Order * | get_order (const std::string &order_url) |
| void | remove_order (const std::string &order_url) |
| nlohmann::json | mk_kid_header (const std::string &account_url, const std::string &nonce, const std::string &resource_url) |
| void | request_directory () |
| void | request_new_nonce (std::function< void()> ok_callback) |
| void | request_new_account () |
| void | authorize_next_challenge (const std::string &order_url) |
| void | request_new_order (const std::string &account_url) |
| void | request_authorization (Order &order, const std::string &authz_url) |
| std::string | make_challenge_response () const |
| void | add_challenge (Order &order, const std::string &token, const std::string &authorization_url, const std::string &challenge_url) |
| std::unique_ptr< threading::Tmsg< ChallengeWaitMsg > > | schedule_check_challenge (const std::string &order_url, Challenge &challenge) |
| bool | check_challenge (const std::string &order_url, const Challenge &challenge) |
| void | finish_challenge (const std::string &order_url, const std::string &challenge_token) |
| bool | check_finalization (const std::string &order_url) |
| std::unique_ptr< threading::Tmsg< FinalizationWaitMsg > > | schedule_check_finalization (const std::string &order_url) |
| virtual std::vector< uint8_t > | get_service_csr () |
| void | request_finalization (const std::string &order_url) |
| void | request_certificate (const std::string &order_url) |
Static Protected Member Functions | |
| static http::URL | with_default_port (const std::string &url, const std::string &default_port="443") |
| static std::vector< uint8_t > | s2v (const std::string &s) |
| static std::vector< uint8_t > | json_to_bytes (const nlohmann::json &j) |
| static std::string | json_to_b64url (const nlohmann::json &j, bool with_padding=true) |
| static void | convert_signature_to_ieee_p1363 (std::vector< uint8_t > &sig, const ccf::crypto::KeyPair &signer) |
| static std::optional< std::string > | get_header_value (const ccf::http::HeaderMap &headers, const std::string &name) |
| static void | expect (const nlohmann::json &j, const std::string &key) |
| static void | expect_string (const nlohmann::json &j, const std::string &key, const std::string &value) |
| static std::pair< std::string, std::string > | get_crv_alg (const std::shared_ptr< ccf::crypto::KeyPair > &key_pair) |
Protected Attributes | |
| ClientConfig | config |
| std::shared_ptr< ccf::crypto::KeyPair > | service_key |
| std::shared_ptr< ccf::crypto::KeyPair > | account_key_pair |
| nlohmann::json | directory |
| nlohmann::json | account |
| std::list< std::string > | nonces |
| ccf::pal::Mutex | req_lock |
| ccf::pal::Mutex | orders_lock |
| std::optional< std::chrono::system_clock::time_point > | last_request |
| size_t | num_failed_attempts = 0 |
| std::list< Order > | active_orders |
|
protected |
|
inline |
|
inlinevirtual |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlineprotected |
|
inline |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlineprotected |
|
inlineprotectedvirtual |
|
inline |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
protectedpure virtual |
Implemented in ccf::ACMEClient.
|
protectedpure virtual |
Implemented in ccf::ACMEClient.
|
protectedpure virtual |
Implemented in ccf::ACMEClient.
|
protectedpure virtual |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlineprotected |
|
inlinestaticprotected |
|
inlineprotected |
|
inlineprotected |
|
inlinevirtual |
Reimplemented in ccf::ACMEClient.
|
inline |
|
inlinestaticprotected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |