46#ifndef CONFIG_CREDMAN_MAX_CREDENTIALS
47#define CONFIG_CREDMAN_MAX_CREDENTIALS (2)
53#ifndef CONFIG_CREDMAN_MAX_ASN1_OBJ
54#define CONFIG_CREDMAN_MAX_ASN1_OBJ (8)
101#define CREDMAN_TAG_EMPTY (0)
196#if IS_USED(MODULE_CREDMAN_LOAD) || DOXYGEN
int credman_load_public_key(const void *buf, size_t buf_len, ecdsa_public_key_t *out)
Load a public key from a buffer, as a SubjectPublicKeyInfo sequence, according to RFC5280.
void credman_delete(credman_tag_t tag, credman_type_t type)
Delete a credential from the credential pool.
int credman_get_used_count(void)
Gets the number of credentials currently in the credential pool.
int credman_add(const credman_credential_t *credential)
Adds a credential to the credential pool.
int credman_load_private_key(const void *buf, size_t buf_len, credman_credential_t *cred)
Load a private key from a buffer, as a OneAsymmetricKey sequence, according to RFC5958.
int credman_load_private_ecc_key(const void *buf, size_t buf_len, credman_credential_t *cred)
Load an ECC private key from a buffer, as an ECPrivateKey sequence, according to RFC5915.
uint16_t credman_tag_t
Tag of the credential.
credman_type_t
Credential types.
int credman_get(credman_credential_t *credential, credman_tag_t tag, credman_type_t type)
Gets a credential from credential pool.
void credman_reset(void)
Empties the credential pool.
@ CREDMAN_TYPE_EMPTY
Empty type.
@ CREDMAN_TYPE_ECDSA
ECDSA credential type.
@ CREDMAN_TYPE_PSK
PSK credential type.
@ CREDMAN_EXIST
Credential already exist in system pool.
@ CREDMAN_NOT_FOUND
Credential not found in the system pool.
@ CREDMAN_ERROR
Other errors.
@ CREDMAN_INVALID
Invalid input parameter(s)
@ CREDMAN_NO_SPACE
No space in system pool for new credential.
@ CREDMAN_TYPE_UNKNOWN
Unknown credential type.
Common macros and compiler attributes/pragmas configuration.
Buffer of the credential.
size_t len
Length of credman_buffer_t::s.
const void * s
Pointer to the buffer.
psk_params_t psk
PSK credential parameters.
credman_type_t type
Type of the credential.
ecdsa_params_t ecdsa
ECDSA credential parameters.
credman_tag_t tag
Tag of the credential.
const void * private_key
Pointer to the private key.
size_t client_keys_size
Size of ecdsa_params_t::clients_keys.
ecdsa_public_key_t public_key
Public key.
ecdsa_public_key_t * client_keys
Array of clients public keys.
const void * x
X part of the public key.
const void * y
Y part of the public key.
credman_buffer_t hint
Hint buffer.
credman_buffer_t key
Key buffer.
credman_buffer_t id
ID buffer.