Request device certificate

This commit is contained in:
2024-08-29 00:09:47 +02:00
parent d890b23670
commit 31f4203c43
6 changed files with 84 additions and 8 deletions

View File

@ -11,6 +11,7 @@
#define PRIVATE_KEY "prikey"
#define SEC_ORIG_KEY "secureOrig"
#define SEC_ROOT_CA_KEY "rootCA"
#define DEV_CERT_KEY "certKey"
static const char *TAG = "storage";
@ -106,4 +107,8 @@ size_t storage_get_secure_origin(char *dest) { return storage_get_str(SEC_ORIG_K
void storage_set_root_ca(const char *ca) { storage_set_str(SEC_ROOT_CA_KEY, ca); }
size_t storage_get_root_ca(char *dest) { return storage_get_str(SEC_ROOT_CA_KEY, ROOT_CA_MAX_BYTES, dest); }
size_t storage_get_root_ca(char *dest) { return storage_get_str(SEC_ROOT_CA_KEY, ROOT_CA_MAX_BYTES, dest); }
void storage_set_dev_cert(const char *cert) { storage_set_str(DEV_CERT_KEY, cert); }
size_t storage_get_dev_cert(char *dest) { return storage_get_str(DEV_CERT_KEY, DEV_CERT_MAX_BYTES, dest); }