ACME-DNS client. More...
#include "acme_config.h"
#include "core/net.h"
#include "http/http_client.h"
#include "core/crypto.h"
#include "tls.h"
Go to the source code of this file.
Data Structures | |
struct | _AcmeDnsClientContext |
ACME-DNS client context. More... | |
Macros | |
#define | ACME_DNS_CLIENT_SUPPORT ENABLED |
#define | ACME_DNS_CLIENT_TLS_SUPPORT DISABLED |
#define | ACME_DNS_CLIENT_DEFAULT_TIMEOUT 20000 |
#define | ACME_DNS_CLIENT_BUFFER_SIZE 512 |
#define | ACME_DNS_CLIENT_MAX_HOST_LEN 64 |
#define | ACME_DNS_CLIENT_MAX_USERNAME_LEN 64 |
#define | ACME_DNS_CLIENT_MAX_PASSWORD_LEN 64 |
#define | ACME_DNS_CLIENT_MAX_SUB_DOMAIN_LEN 64 |
#define | ACME_DNS_CLIENT_MAX_FULL_DOMAIN_LEN 128 |
#define | ACME_DNS_TXT_RECORD_LEN 43 |
#define | AcmeDnsClientContext struct _AcmeDnsClientContext |
Typedefs | |
typedef error_t(* | AcmeDnsClientTlsInitCallback) (HttpClientContext *context, TlsContext *tlsContext) |
TLS initialization callback function. More... | |
Enumerations | |
enum | AcmeDnsClientState { ACME_DNS_CLIENT_STATE_DISCONNECTED = 0, ACME_DNS_CLIENT_STATE_CONNECTING = 1, ACME_DNS_CLIENT_STATE_CONNECTED = 2, ACME_DNS_CLIENT_STATE_SEND_HEADER = 3, ACME_DNS_CLIENT_STATE_SEND_BODY = 4, ACME_DNS_CLIENT_STATE_RECEIVE_HEADER = 5, ACME_DNS_CLIENT_STATE_PARSE_HEADER = 6, ACME_DNS_CLIENT_STATE_RECEIVE_BODY = 7, ACME_DNS_CLIENT_STATE_PARSE_BODY = 8, ACME_DNS_CLIENT_STATE_CLOSE_BODY = 9, ACME_DNS_CLIENT_STATE_DISCONNECTING = 10 } |
ACME-DNS client states. More... | |
Detailed Description
ACME-DNS client.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2019-2024 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneACME Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.4.4
Definition in file acme_dns_client.h.
Macro Definition Documentation
◆ ACME_DNS_CLIENT_BUFFER_SIZE
#define ACME_DNS_CLIENT_BUFFER_SIZE 512 |
Definition at line 62 of file acme_dns_client.h.
◆ ACME_DNS_CLIENT_DEFAULT_TIMEOUT
#define ACME_DNS_CLIENT_DEFAULT_TIMEOUT 20000 |
Definition at line 55 of file acme_dns_client.h.
◆ ACME_DNS_CLIENT_MAX_FULL_DOMAIN_LEN
#define ACME_DNS_CLIENT_MAX_FULL_DOMAIN_LEN 128 |
Definition at line 97 of file acme_dns_client.h.
◆ ACME_DNS_CLIENT_MAX_HOST_LEN
#define ACME_DNS_CLIENT_MAX_HOST_LEN 64 |
Definition at line 69 of file acme_dns_client.h.
◆ ACME_DNS_CLIENT_MAX_PASSWORD_LEN
#define ACME_DNS_CLIENT_MAX_PASSWORD_LEN 64 |
Definition at line 83 of file acme_dns_client.h.
◆ ACME_DNS_CLIENT_MAX_SUB_DOMAIN_LEN
#define ACME_DNS_CLIENT_MAX_SUB_DOMAIN_LEN 64 |
Definition at line 90 of file acme_dns_client.h.
◆ ACME_DNS_CLIENT_MAX_USERNAME_LEN
#define ACME_DNS_CLIENT_MAX_USERNAME_LEN 64 |
Definition at line 76 of file acme_dns_client.h.
◆ ACME_DNS_CLIENT_SUPPORT
#define ACME_DNS_CLIENT_SUPPORT ENABLED |
Definition at line 41 of file acme_dns_client.h.
◆ ACME_DNS_CLIENT_TLS_SUPPORT
#define ACME_DNS_CLIENT_TLS_SUPPORT DISABLED |
Definition at line 48 of file acme_dns_client.h.
◆ ACME_DNS_TXT_RECORD_LEN
#define ACME_DNS_TXT_RECORD_LEN 43 |
Definition at line 103 of file acme_dns_client.h.
◆ AcmeDnsClientContext
#define AcmeDnsClientContext struct _AcmeDnsClientContext |
Definition at line 113 of file acme_dns_client.h.
Typedef Documentation
◆ AcmeDnsClientTlsInitCallback
typedef error_t(* AcmeDnsClientTlsInitCallback) (HttpClientContext *context, TlsContext *tlsContext) |
TLS initialization callback function.
Definition at line 148 of file acme_dns_client.h.
Enumeration Type Documentation
◆ AcmeDnsClientState
enum AcmeDnsClientState |
ACME-DNS client states.
Definition at line 125 of file acme_dns_client.h.
Function Documentation
◆ acmeDnsClientBindToInterface()
error_t acmeDnsClientBindToInterface | ( | AcmeDnsClientContext * | context, |
NetInterface * | interface | ||
) |
Bind the ACME-DNS client to a particular network interface.
- Parameters
-
[in] context Pointer to the ACME-DNS client context [in] interface Network interface to be used
- Returns
- Error code
Definition at line 335 of file acme_dns_client.c.
◆ acmeDnsClientClose()
error_t acmeDnsClientClose | ( | AcmeDnsClientContext * | context | ) |
Close the connection with the ACME-DNS server.
- Parameters
-
[in] context Pointer to the ACME-DNS client context
- Returns
- Error code
Definition at line 839 of file acme_dns_client.c.
◆ acmeDnsClientConnect()
error_t acmeDnsClientConnect | ( | AcmeDnsClientContext * | context, |
const IpAddr * | serverIpAddr, | ||
uint16_t | serverPort | ||
) |
Establish a connection with the specified ACME-DNS server.
- Parameters
-
[in] context Pointer to the ACME-DNS client context [in] serverIpAddr IP address of the ACME-DNS server to connect to [in] serverPort Port number
- Returns
- Error code
Definition at line 358 of file acme_dns_client.c.
◆ acmeDnsClientDeinit()
void acmeDnsClientDeinit | ( | AcmeDnsClientContext * | context | ) |
Release ACME-DNS client context.
- Parameters
-
[in] context Pointer to the ACME-DNS client context
Definition at line 860 of file acme_dns_client.c.
◆ acmeDnsClientDisconnect()
error_t acmeDnsClientDisconnect | ( | AcmeDnsClientContext * | context | ) |
Gracefully disconnect from the ACME-DNS server.
- Parameters
-
[in] context Pointer to the ACME-DNS client context
- Returns
- Error code
Definition at line 773 of file acme_dns_client.c.
◆ acmeDnsClientGetFullDomain()
const char_t* acmeDnsClientGetFullDomain | ( | AcmeDnsClientContext * | context | ) |
Get full domain.
- Parameters
-
[in] context Pointer to the ACME-DNS client context
- Returns
- NULL-terminated string containing the full domain
Definition at line 309 of file acme_dns_client.c.
◆ acmeDnsClientGetPassword()
const char_t* acmeDnsClientGetPassword | ( | AcmeDnsClientContext * | context | ) |
Get password.
- Parameters
-
[in] context Pointer to the ACME-DNS client context
- Returns
- NULL-terminated string containing the password
Definition at line 259 of file acme_dns_client.c.
◆ acmeDnsClientGetSubDomain()
const char_t* acmeDnsClientGetSubDomain | ( | AcmeDnsClientContext * | context | ) |
Get sub domain.
- Parameters
-
[in] context Pointer to the ACME-DNS client context
- Returns
- NULL-terminated string containing the sub domain
Definition at line 284 of file acme_dns_client.c.
◆ acmeDnsClientGetUsername()
const char_t* acmeDnsClientGetUsername | ( | AcmeDnsClientContext * | context | ) |
Get user name.
- Parameters
-
[in] context Pointer to the ACME-DNS client context
- Returns
- NULL-terminated string containing the user name
Definition at line 234 of file acme_dns_client.c.
◆ acmeDnsClientInit()
error_t acmeDnsClientInit | ( | AcmeDnsClientContext * | context | ) |
Initialize ACME-DNS client context.
- Parameters
-
[in] context Pointer to the ACME-DNS client context
- Returns
- Error code
Definition at line 49 of file acme_dns_client.c.
◆ acmeDnsClientRegister()
error_t acmeDnsClientRegister | ( | AcmeDnsClientContext * | context | ) |
Register endpoint.
- Parameters
-
[in] context Pointer to the ACME-DNS client context
- Returns
- Error code
Definition at line 460 of file acme_dns_client.c.
◆ acmeDnsClientRegisterTlsInitCallback()
error_t acmeDnsClientRegisterTlsInitCallback | ( | AcmeDnsClientContext * | context, |
AcmeDnsClientTlsInitCallback | callback | ||
) |
Register TLS initialization callback function.
- Parameters
-
[in] context Pointer to the ACME-DNS client context [in] callback TLS initialization callback function
- Returns
- Error code
Definition at line 85 of file acme_dns_client.c.
◆ acmeDnsClientSetHost()
error_t acmeDnsClientSetHost | ( | AcmeDnsClientContext * | context, |
const char_t * | host | ||
) |
Set the domain name of the ACME-DNS server.
- Parameters
-
[in] context Pointer to the ACME-DNS client context [in] host NULL-terminated string containing the host name
- Returns
- Error code
Definition at line 131 of file acme_dns_client.c.
◆ acmeDnsClientSetPassword()
error_t acmeDnsClientSetPassword | ( | AcmeDnsClientContext * | context, |
const char_t * | password | ||
) |
Set password.
- Parameters
-
[in] context Pointer to the ACME-DNS client context [in] password NULL-terminated string containing the password
- Returns
- Error code
Definition at line 183 of file acme_dns_client.c.
◆ acmeDnsClientSetSubDomain()
error_t acmeDnsClientSetSubDomain | ( | AcmeDnsClientContext * | context, |
const char_t * | subDomain | ||
) |
Set sub domain.
- Parameters
-
[in] context Pointer to the ACME-DNS client context [in] subDomain NULL-terminated string containing the sub domain
- Returns
- Error code
Definition at line 209 of file acme_dns_client.c.
◆ acmeDnsClientSetTimeout()
error_t acmeDnsClientSetTimeout | ( | AcmeDnsClientContext * | context, |
systime_t | timeout | ||
) |
Set communication timeout.
- Parameters
-
[in] context Pointer to the ACME-DNS client context [in] timeout Timeout value, in milliseconds
- Returns
- Error code
Definition at line 109 of file acme_dns_client.c.
◆ acmeDnsClientSetUsername()
error_t acmeDnsClientSetUsername | ( | AcmeDnsClientContext * | context, |
const char_t * | username | ||
) |
Set user name.
- Parameters
-
[in] context Pointer to the ACME-DNS client context [in] username NULL-terminated string containing the user name
- Returns
- Error code
Definition at line 157 of file acme_dns_client.c.
◆ acmeDnsClientUpdate()
error_t acmeDnsClientUpdate | ( | AcmeDnsClientContext * | context, |
const char_t * | txt | ||
) |
Update endpoint.
- Parameters
-
[in] context Pointer to the ACME-DNS client context [in] txt NULL-terminated string that contains the value of the TXT record
- Returns
- Error code
Definition at line 602 of file acme_dns_client.c.