forked from mirrors/kore
set a default acme provider (letsencrypt)
This commit is contained in:
parent
c55ec5c0d8
commit
bb159da725
|
@ -44,6 +44,7 @@ extern "C" {
|
|||
#define KORE_ACME_CHALLENGE_SET_CERT (KORE_MSG_ACME_BASE + 21)
|
||||
#define KORE_ACME_CHALLENGE_CLEAR_CERT (KORE_MSG_ACME_BASE + 22)
|
||||
|
||||
void kore_acme_init(void);
|
||||
void kore_acme_run(void);
|
||||
void kore_acme_setup(void);
|
||||
|
||||
|
|
12
src/acme.c
12
src/acme.c
|
@ -48,6 +48,12 @@
|
|||
#define ACME_STATUS_EXPIRED 6
|
||||
#define ACME_STATUS_REVOKED 7
|
||||
|
||||
/*
|
||||
* The default provider is letsencrypt, can be overwritten via the config
|
||||
* file its acme_provider setting.
|
||||
*/
|
||||
#define ACME_DEFAULT_PROVIDER "https://acme-v02.api.letsencrypt.org/directory"
|
||||
|
||||
#if defined(__linux__)
|
||||
#include "seccomp.h"
|
||||
|
||||
|
@ -241,6 +247,12 @@ char *acme_root_path = NULL;
|
|||
char *acme_runas_user = NULL;
|
||||
u_int32_t acme_request_timeout = 8;
|
||||
|
||||
void
|
||||
kore_acme_init(void)
|
||||
{
|
||||
acme_provider = kore_strdup(ACME_DEFAULT_PROVIDER);
|
||||
}
|
||||
|
||||
void
|
||||
kore_acme_run(void)
|
||||
{
|
||||
|
|
|
@ -259,6 +259,9 @@ main(int argc, char *argv[])
|
|||
kore_auth_init();
|
||||
kore_validator_init();
|
||||
kore_filemap_init();
|
||||
#endif
|
||||
#if defined(KORE_USE_ACME)
|
||||
kore_acme_init();
|
||||
#endif
|
||||
kore_domain_init();
|
||||
kore_module_init();
|
||||
|
|
Loading…
Reference in New Issue