73 lines
1.2 KiB
C
Raw Normal View History

2024-07-27 15:31:17 +02:00
/**
* Storage management
*/
#pragma once
#include <stdbool.h>
#include <stddef.h>
#ifdef __cplusplus
extern "C"
{
#endif
/**
* Initialize storage
*/
bool storage_init();
/**
* Write device name
*/
void storage_set_dev_name(const char *name);
/**
* Get current device name
*/
size_t storage_get_dev_name(char *dest);
2024-08-15 13:09:01 +02:00
/**
* Write private key
*/
void storage_set_priv_key(unsigned char *key, size_t len);
/**
* Get current private key
*/
size_t storage_get_priv_key(unsigned char *key);
2024-08-18 17:40:41 +02:00
/**
* Write secure origin
*/
2024-08-18 19:42:40 +02:00
void storage_set_secure_origin(const char *orig);
2024-08-18 17:40:41 +02:00
/**
* Get current secure origin
*/
size_t storage_get_secure_origin(char *dest);
2024-08-18 19:42:40 +02:00
/**
* Write root CA
*/
void storage_set_root_ca(const char *ca);
/**
* Get current root CA
*/
size_t storage_get_root_ca(char *dest);
2024-08-29 00:09:47 +02:00
/**
* Write device certificate
*/
void storage_set_dev_cert(const char *cert);
/**
* Get current device certificate
*/
size_t storage_get_dev_cert(char *dest);
2024-07-27 15:31:17 +02:00
#ifdef __cplusplus
}
#endif