acme_client_account.c File Reference

Account object management. More...

#include "acme/acme_client.h"
#include "acme/acme_client_account.h"
#include "acme/acme_client_jose.h"
#include "acme/acme_client_misc.h"
#include "jansson.h"
#include "jansson_private.h"
#include "debug.h"

Go to the source code of this file.

Macros

#define TRACE_LEVEL   ACME_TRACE_LEVEL
 

Functions

error_t acmeClientCheckAccountParams (const AcmeAccountParams *params)
 Check account information. More...
 
error_t acmeClientSendNewAccountRequest (AcmeClientContext *context, const AcmeAccountParams *params, bool_t onlyReturnExisting)
 Send HTTP request (newAccount URL) More...
 
error_t acmeClientFormatNewAccountRequest (AcmeClientContext *context, const AcmeAccountParams *params, bool_t onlyReturnExisting)
 Format HTTP request body (newAccount URL) More...
 
error_t acmeClientParseNewAccountResponse (AcmeClientContext *context)
 Parse HTTP response (newAccount URL) More...
 
error_t acmeClientSendUpdateAccountRequest (AcmeClientContext *context, const AcmeAccountParams *params)
 Send HTTP request (account URL) More...
 
error_t acmeFormatUpdateAccountRequest (AcmeClientContext *context, const AcmeAccountParams *params)
 Format HTTP request body (account URL) More...
 
error_t acmeClientParseUpdateAccountResponse (AcmeClientContext *context)
 Parse HTTP response (account URL) More...
 
error_t acmeClientSendKeyChangeRequest (AcmeClientContext *context, const char_t *publicKey, size_t publicKeyLen, const char_t *privateKey, size_t privateKeyLen)
 Send HTTP request (keyChange URL) More...
 
error_t acmeClientFormatKeyChangeRequest (AcmeClientContext *context, const char_t *publicKey, size_t publicKeyLen, const char_t *privateKey, size_t privateKeyLen)
 Format HTTP request body (keyChange URL) More...
 
error_t acmeClientParseKeyChangeResponse (AcmeClientContext *context)
 Parse HTTP response (keyChange URL) More...
 

Detailed Description

Account object management.

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.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.4.4

Definition in file acme_client_account.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   ACME_TRACE_LEVEL

Definition at line 32 of file acme_client_account.c.

Function Documentation

◆ acmeClientCheckAccountParams()

error_t acmeClientCheckAccountParams ( const AcmeAccountParams params)

Check account information.

Parameters
[in]paramsAccount information
Returns
Error code

Definition at line 53 of file acme_client_account.c.

◆ acmeClientFormatKeyChangeRequest()

error_t acmeClientFormatKeyChangeRequest ( AcmeClientContext context,
const char_t publicKey,
size_t  publicKeyLen,
const char_t privateKey,
size_t  privateKeyLen 
)

Format HTTP request body (keyChange URL)

Parameters
[in]contextPointer to the ACME client context
[in]publicKeyNew public key (PEM format)
[in]publicKeyLenLength of the new public key
[in]privateKeyNew private key (PEM format)
[in]privateKeyLenLength of the new private key
Returns
Error code

Definition at line 655 of file acme_client_account.c.

◆ acmeClientFormatNewAccountRequest()

error_t acmeClientFormatNewAccountRequest ( AcmeClientContext context,
const AcmeAccountParams params,
bool_t  onlyReturnExisting 
)

Format HTTP request body (newAccount URL)

Parameters
[in]contextPointer to the ACME client context
[in]paramsAccount information
[in]onlyReturnExistingDo not create a new account if one does not already exist
Returns
Error code

Definition at line 198 of file acme_client_account.c.

◆ acmeClientParseKeyChangeResponse()

error_t acmeClientParseKeyChangeResponse ( AcmeClientContext context)

Parse HTTP response (keyChange URL)

Parameters
[in]contextPointer to the ACME client context
Returns
Error code

Definition at line 793 of file acme_client_account.c.

◆ acmeClientParseNewAccountResponse()

error_t acmeClientParseNewAccountResponse ( AcmeClientContext context)

Parse HTTP response (newAccount URL)

Parameters
[in]contextPointer to the ACME client context
Returns
Error code

Definition at line 315 of file acme_client_account.c.

◆ acmeClientParseUpdateAccountResponse()

error_t acmeClientParseUpdateAccountResponse ( AcmeClientContext context)

Parse HTTP response (account URL)

Parameters
[in]contextPointer to the ACME client context
Returns
Error code

Definition at line 535 of file acme_client_account.c.

◆ acmeClientSendKeyChangeRequest()

error_t acmeClientSendKeyChangeRequest ( AcmeClientContext context,
const char_t publicKey,
size_t  publicKeyLen,
const char_t privateKey,
size_t  privateKeyLen 
)

Send HTTP request (keyChange URL)

Parameters
[in]contextPointer to the ACME client context
[in]publicKeyNew public key (PEM format)
[in]publicKeyLenLength of the new public key
[in]privateKeyNew private key (PEM format)
[in]privateKeyLenLength of the new private key
Returns
Error code

Definition at line 561 of file acme_client_account.c.

◆ acmeClientSendNewAccountRequest()

error_t acmeClientSendNewAccountRequest ( AcmeClientContext context,
const AcmeAccountParams params,
bool_t  onlyReturnExisting 
)

Send HTTP request (newAccount URL)

Parameters
[in]contextPointer to the ACME client context
[in]paramsAccount information
[in]onlyReturnExistingDo not create a new account if one does not already exist
Returns
Error code

Definition at line 87 of file acme_client_account.c.

◆ acmeClientSendUpdateAccountRequest()

error_t acmeClientSendUpdateAccountRequest ( AcmeClientContext context,
const AcmeAccountParams params 
)

Send HTTP request (account URL)

Parameters
[in]contextPointer to the ACME client context
[in]paramsAccount information
Returns
Error code

Definition at line 343 of file acme_client_account.c.

◆ acmeFormatUpdateAccountRequest()

error_t acmeFormatUpdateAccountRequest ( AcmeClientContext context,
const AcmeAccountParams params 
)

Format HTTP request body (account URL)

Parameters
[in]contextPointer to the ACME client context
[in]paramsAccount information
Returns
Error code

Definition at line 431 of file acme_client_account.c.