Apache HTTPD
Functions | Variables
md_acme_drive.c File Reference
#include <assert.h>
#include <stdlib.h>
#include <apr_lib.h>
#include <apr_strings.h>
#include <apr_buckets.h>
#include <apr_hash.h>
#include <apr_uri.h>
#include "md.h"
#include "md_crypt.h"
#include "md_json.h"
#include "md_jws.h"
#include "md_http.h"
#include "md_log.h"
#include "md_result.h"
#include "md_reg.h"
#include "md_store.h"
#include "md_util.h"
#include "md_acme.h"
#include "md_acme_acct.h"
#include "md_acme_authz.h"
#include "md_acme_order.h"
#include "md_acme_drive.h"
#include "md_acmev2_drive.h"

Go to the source code of this file.

Functions

static apr_status_t use_staged_acct (md_acme_t *acme, struct md_store_t *store, const md_t *md, apr_pool_t *p)
 
static apr_status_t save_acct_staged (md_acme_t *acme, md_store_t *store, const char *md_name, apr_pool_t *p)
 
apr_status_t md_acme_drive_set_acct (md_proto_driver_t *d, md_result_t *result)
 
static void get_up_link (md_proto_driver_t *d, apr_table_t *headers)
 
static apr_status_t add_http_certs (apr_array_header_t *chain, apr_pool_t *p, const md_http_response_t *res)
 
static apr_status_t on_add_cert (md_acme_t *acme, const md_http_response_t *res, void *baton)
 
static apr_status_t get_cert (void *baton, int attempt)
 
apr_status_t md_acme_drive_cert_poll (md_proto_driver_t *d, int only_once)
 
static apr_status_t on_init_csr_req (md_acme_req_t *req, void *baton)
 
static apr_status_t csr_req (md_acme_t *acme, const md_http_response_t *res, void *baton)
 
apr_status_t md_acme_drive_setup_cred_chain (md_proto_driver_t *d, md_result_t *result)
 
static apr_status_t on_add_chain (md_acme_t *acme, const md_http_response_t *res, void *baton)
 
static apr_status_t get_chain (void *baton, int attempt)
 
static apr_status_t ad_chain_retrieve (md_proto_driver_t *d)
 
static apr_status_t acme_driver_preload_init (md_proto_driver_t *d, md_result_t *result)
 
static apr_status_t acme_driver_init (md_proto_driver_t *d, md_result_t *result)
 
static apr_status_t load_missing_creds (md_proto_driver_t *d)
 
static apr_status_t acme_renew (md_proto_driver_t *d, md_result_t *result)
 
static apr_status_t acme_driver_renew (md_proto_driver_t *d, md_result_t *result)
 
static apr_status_t acme_preload (md_proto_driver_t *d, md_store_group_t load_group, const char *name, md_result_t *result)
 
static apr_status_t acme_driver_preload (md_proto_driver_t *d, md_store_group_t group, md_result_t *result)
 
static apr_status_t acme_complete_md (md_t *md, apr_pool_t *p)
 
apr_status_t md_acme_protos_add (apr_hash_t *protos, apr_pool_t *p)
 

Variables

static md_proto_t ACME_PROTO
 

Function Documentation

◆ acme_complete_md()

static apr_status_t acme_complete_md ( md_t md,
apr_pool_t p 
)
static

Definition at line 1085 of file md_acme_drive.c.

◆ acme_driver_init()

static apr_status_t acme_driver_init ( md_proto_driver_t d,
md_result_t result 
)
static

Definition at line 536 of file md_acme_drive.c.

◆ acme_driver_preload()

static apr_status_t acme_driver_preload ( md_proto_driver_t d,
md_store_group_t  group,
md_result_t result 
)
static

Definition at line 1075 of file md_acme_drive.c.

◆ acme_driver_preload_init()

static apr_status_t acme_driver_preload_init ( md_proto_driver_t d,
md_result_t result 
)
static

Definition at line 505 of file md_acme_drive.c.

◆ acme_driver_renew()

static apr_status_t acme_driver_renew ( md_proto_driver_t d,
md_result_t result 
)
static

Definition at line 927 of file md_acme_drive.c.

◆ acme_preload()

static apr_status_t acme_preload ( md_proto_driver_t d,
md_store_group_t  load_group,
const char name,
md_result_t result 
)
static

Definition at line 939 of file md_acme_drive.c.

◆ acme_renew()

static apr_status_t acme_renew ( md_proto_driver_t d,
md_result_t result 
)
static

Definition at line 652 of file md_acme_drive.c.

◆ ad_chain_retrieve()

static apr_status_t ad_chain_retrieve ( md_proto_driver_t d)
static

Definition at line 461 of file md_acme_drive.c.

◆ add_http_certs()

static apr_status_t add_http_certs ( apr_array_header_t chain,
apr_pool_t p,
const md_http_response_t res 
)
static

Definition at line 208 of file md_acme_drive.c.

◆ csr_req()

static apr_status_t csr_req ( md_acme_t acme,
const md_http_response_t res,
void *  baton 
)
static

Definition at line 298 of file md_acme_drive.c.

◆ get_cert()

static apr_status_t get_cert ( void *  baton,
int  attempt 
)
static

Definition at line 251 of file md_acme_drive.c.

◆ get_chain()

static apr_status_t get_chain ( void *  baton,
int  attempt 
)
static

Definition at line 417 of file md_acme_drive.c.

◆ get_up_link()

static void get_up_link ( md_proto_driver_t d,
apr_table_t headers 
)
static

Definition at line 197 of file md_acme_drive.c.

◆ load_missing_creds()

static apr_status_t load_missing_creds ( md_proto_driver_t d)
static

Definition at line 620 of file md_acme_drive.c.

◆ md_acme_drive_cert_poll()

apr_status_t md_acme_drive_cert_poll ( md_proto_driver_t d,
int  only_once 
)

Definition at line 262 of file md_acme_drive.c.

◆ md_acme_drive_set_acct()

apr_status_t md_acme_drive_set_acct ( md_proto_driver_t d,
md_result_t result 
)

Definition at line 81 of file md_acme_drive.c.

◆ md_acme_drive_setup_cred_chain()

apr_status_t md_acme_drive_setup_cred_chain ( md_proto_driver_t d,
md_result_t result 
)

Pre-Req: all domains have been validated by the ACME server, e.g. all have AUTHZ resources that have status 'valid'

  • acme_driver->cred keeps the credentials to setup (key spec)

Setup private key, if not already there

  • Generate a CSR with org, contact, etc
  • Optionally enable must-staple OCSP extension
  • Submit CSR, expect 201 with location
  • POLL location for certificate
  • store certificate
  • retrieve cert chain information from cert
  • GET cert chain
  • store cert chain

Definition at line 354 of file md_acme_drive.c.

◆ md_acme_protos_add()

apr_status_t md_acme_protos_add ( apr_hash_t protos,
apr_pool_t p 
)

Definition at line 1101 of file md_acme_drive.c.

◆ on_add_cert()

static apr_status_t on_add_cert ( md_acme_t acme,
const md_http_response_t res,
void *  baton 
)
static

Definition at line 234 of file md_acme_drive.c.

◆ on_add_chain()

static apr_status_t on_add_chain ( md_acme_t acme,
const md_http_response_t res,
void *  baton 
)
static

Definition at line 395 of file md_acme_drive.c.

◆ on_init_csr_req()

static apr_status_t on_init_csr_req ( md_acme_req_t req,
void *  baton 
)
static

Definition at line 286 of file md_acme_drive.c.

◆ save_acct_staged()

static apr_status_t save_acct_staged ( md_acme_t acme,
md_store_t store,
const char md_name,
apr_pool_t p 
)
static

Definition at line 65 of file md_acme_drive.c.

◆ use_staged_acct()

static apr_status_t use_staged_acct ( md_acme_t acme,
struct md_store_t store,
const md_t md,
apr_pool_t p 
)
static

Definition at line 48 of file md_acme_drive.c.

Variable Documentation

◆ ACME_PROTO

md_proto_t ACME_PROTO
static
Initial value:
= {
}
static apr_status_t acme_driver_preload_init(md_proto_driver_t *d, md_result_t *result)
static apr_status_t acme_complete_md(md_t *md, apr_pool_t *p)
static apr_status_t acme_driver_renew(md_proto_driver_t *d, md_result_t *result)
static apr_status_t acme_driver_init(md_proto_driver_t *d, md_result_t *result)
static apr_status_t acme_driver_preload(md_proto_driver_t *d, md_store_group_t group, md_result_t *result)

Definition at line 1095 of file md_acme_drive.c.