|
Apache HTTPD
|
Go to the source code of this file.
Classes | |
| struct | md_acme_t |
| struct | md_acme_req_t |
Macros | |
| #define | MD_PROTO_ACME "ACME" |
| #define | MD_AUTHZ_CHA_HTTP_01 "http-01" |
| #define | MD_AUTHZ_CHA_SNI_01 "tls-sni-01" |
| #define | MD_ACME_VERSION_UNKNOWN 0x0 |
| #define | MD_ACME_VERSION_1 0x010000 |
| #define | MD_ACME_VERSION_2 0x020000 |
| #define | MD_ACME_VERSION_MAJOR(i) (((i)&0xFF0000) >> 16) |
Typedefs | |
| typedef struct md_acme_t | md_acme_t |
| typedef struct md_acme_req_t | md_acme_req_t |
| typedef apr_status_t | md_acme_req_res_cb(md_acme_t *acme, const struct md_http_response_t *res, void *baton) |
| typedef apr_status_t | md_acme_req_init_cb(md_acme_req_t *req, void *baton) |
| typedef apr_status_t | md_acme_req_json_cb(md_acme_t *acme, apr_pool_t *p, const apr_table_t *headers, struct md_json_t *jbody, void *baton) |
| typedef apr_status_t | md_acme_req_err_cb(md_acme_req_t *req, const struct md_result_t *result, void *baton) |
| typedef apr_status_t | md_acme_new_nonce_fn(md_acme_t *acme) |
| typedef apr_status_t | md_acme_req_init_fn(md_acme_req_t *req, struct md_json_t *jpayload) |
| typedef apr_status_t | md_acme_post_fn(md_acme_t *acme, md_acme_req_init_cb *on_init, md_acme_req_json_cb *on_json, md_acme_req_res_cb *on_res, md_acme_req_err_cb *on_err, void *baton) |
Enumerations | |
| enum | md_acme_state_t { MD_ACME_S_UNKNOWN , MD_ACME_S_REGISTERED , MD_ACME_S_TOS_ACCEPTED , MD_ACME_S_CHALLENGED , MD_ACME_S_VALIDATED , MD_ACME_S_CERTIFIED , MD_ACME_S_DENIED } |
| typedef apr_status_t md_acme_new_nonce_fn(md_acme_t *acme) |
| typedef apr_status_t md_acme_post_fn(md_acme_t *acme, md_acme_req_init_cb *on_init, md_acme_req_json_cb *on_json, md_acme_req_res_cb *on_res, md_acme_req_err_cb *on_err, void *baton) |
| typedef apr_status_t md_acme_req_err_cb(md_acme_req_t *req, const struct md_result_t *result, void *baton) |
| typedef apr_status_t md_acme_req_init_cb(md_acme_req_t *req, void *baton) |
| typedef apr_status_t md_acme_req_init_fn(md_acme_req_t *req, struct md_json_t *jpayload) |
| typedef apr_status_t md_acme_req_json_cb(md_acme_t *acme, apr_pool_t *p, const apr_table_t *headers, struct md_json_t *jbody, void *baton) |
| typedef apr_status_t md_acme_req_res_cb(md_acme_t *acme, const struct md_http_response_t *res, void *baton) |
| apr_status_t md_acme_acct_deactivate | ( | md_acme_t * | acme, |
| apr_pool_t * | p | ||
| ) |
Deactivate the current account at the ACME server..
Definition at line 682 of file md_acme_acct.c.
| apr_status_t md_acme_agree | ( | md_acme_t * | acme, |
| apr_pool_t * | p, | ||
| const char * | tos | ||
| ) |
Agree to the given Terms-of-Service url for the current account.
Definition at line 714 of file md_acme_acct.c.
| apr_status_t md_acme_check_agreement | ( | md_acme_t * | acme, |
| apr_pool_t * | p, | ||
| const char * | agreement, | ||
| const char ** | prequired | ||
| ) |
Confirm with the server that the current account agrees to the Terms-of-Service given in the agreement url. If the known agreement is equal to this, nothing is done. If it differs, the account is re-validated in the hope that the server announces the Tos URL it wants. If this is equal to the agreement specified, the server is notified of this. If the server requires a ToS that the account thinks it has already given, it is resend.
If an agreement is required, different from the current one, APR_INCOMPLETE is returned and the agreement url is returned in the parameter.
Definition at line 729 of file md_acme_acct.c.
| void md_acme_clear_acct | ( | md_acme_t * | acme | ) |
| apr_status_t md_acme_create | ( | md_acme_t ** | pacme, |
| apr_pool_t * | p, | ||
| const char * | url, | ||
| const char * | proxy_url, | ||
| const char * | ca_file | ||
| ) |
Create a new ACME server instance. If path is not NULL, will use that directory for persisting information. Will load any information persisted in earlier session. url needs only be specified for instances where this has never been persisted before.
| pacme | will hold the ACME server instance on success |
| p | pool to used |
| url | url of the server, optional if known at path |
| proxy_url | optional url of a HTTP(S) proxy to use |
| apr_status_t md_acme_GET | ( | md_acme_t * | acme, |
| const char * | url, | ||
| md_acme_req_init_cb * | on_init, | ||
| md_acme_req_json_cb * | on_json, | ||
| md_acme_req_res_cb * | on_res, | ||
| md_acme_req_err_cb * | on_err, | ||
| void * | baton | ||
| ) |
| apr_status_t md_acme_get_json | ( | struct md_json_t ** | pjson, |
| md_acme_t * | acme, | ||
| const char * | url, | ||
| apr_pool_t * | p | ||
| ) |
| apr_status_t md_acme_init | ( | apr_pool_t * | pool, |
| const char * | base_version, | ||
| int | init_ssl | ||
| ) |
| apr_status_t md_acme_POST | ( | md_acme_t * | acme, |
| const char * | url, | ||
| md_acme_req_init_cb * | on_init, | ||
| md_acme_req_json_cb * | on_json, | ||
| md_acme_req_res_cb * | on_res, | ||
| md_acme_req_err_cb * | on_err, | ||
| void * | baton | ||
| ) |
Perform a POST against the ACME url. If a on_json callback is given and the HTTP response is JSON, only this callback is invoked. Otherwise, on HTTP status 2xx, the on_res callback is invoked. If no on_res is given, it is considered a response error, since only JSON was expected. At least one callback needs to be non-NULL.
| acme | the ACME server to talk to |
| url | the url to send the request to |
| on_init | callback to initialize the request data |
| on_json | callback on successful JSON response |
| on_res | callback on successful HTTP response |
| baton | userdata for callbacks |
| apr_status_t md_acme_POST_new_account | ( | md_acme_t * | acme, |
| md_acme_req_init_cb * | on_init, | ||
| md_acme_req_json_cb * | on_json, | ||
| md_acme_req_res_cb * | on_res, | ||
| md_acme_req_err_cb * | on_err, | ||
| void * | baton | ||
| ) |
| apr_status_t md_acme_protos_add | ( | struct apr_hash_t * | protos, |
| apr_pool_t * | p | ||
| ) |
Definition at line 1101 of file md_acme_drive.c.
| void md_acme_report_result | ( | md_acme_t * | acme, |
| apr_status_t | rv, | ||
| struct md_result_t * | result | ||
| ) |
| apr_status_t md_acme_req_body_init | ( | md_acme_req_t * | req, |
| struct md_json_t * | payload | ||
| ) |
| apr_status_t md_acme_save_acct | ( | md_acme_t * | acme, |
| apr_pool_t * | p, | ||
| struct md_store_t * | store | ||
| ) |
| apr_status_t md_acme_setup | ( | md_acme_t * | acme, |
| struct md_result_t * | result | ||
| ) |
| apr_status_t md_acme_use_acct | ( | md_acme_t * | acme, |
| struct md_store_t * | store, | ||
| apr_pool_t * | p, | ||
| const char * | acct_id | ||
| ) |
Specify the account to use by name in local store. On success, the account is the "current" one used by the acme instance.
| acme | the acme instance to set the account for |
| store | the store to load accounts from |
| p | pool for allocations |
| acct_id | name of the account to load |
| apr_status_t md_acme_use_acct_for_md | ( | md_acme_t * | acme, |
| struct md_store_t * | store, | ||
| apr_pool_t * | p, | ||
| const char * | acct_id, | ||
| const md_t * | md | ||
| ) |
Specify the account to use for a specific MD by name in local store. On success, the account is the "current" one used by the acme instance.
| acme | the acme instance to set the account for |
| store | the store to load accounts from |
| p | pool for allocations |
| acct_id | name of the account to load |
| md | the MD the account shall be used for |