|
Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
|
On-device TLS private key and CSR generation API. More...
#include <stddef.h>#include <stdint.h>#include <zephyr/net/tls_credentials.h>#include <psa/crypto.h>Go to the source code of this file.
Macros | |
| #define | TLS_CREDENTIAL_KEYGEN_PUBKEY_MAX_SIZE 120 |
| Maximum size of the public key in SubjectPublicKeyInfo DER format, for a P-384 key. | |
| #define | TLS_CREDENTIAL_KEYGEN_CSR_SIZE(subject_len) |
| Buffer size that fits a DER CSR of any supported key type. | |
Enumerations | |
| enum | tls_credential_keygen_type { TLS_CREDENTIAL_KEYGEN_ECDSA_SECP256R1 , TLS_CREDENTIAL_KEYGEN_ECDSA_SECP384R1 } |
| Type of the generated key pair. More... | |
Functions | |
| int | tls_credential_keygen_generate (sec_tag_t tag, enum tls_credential_keygen_type type) |
| Generate a device private key for a security tag. | |
| int | tls_credential_keygen_delete (sec_tag_t tag) |
| Delete the device private key of a security tag. | |
| int | tls_credential_keygen_key_id_get (sec_tag_t tag, psa_key_id_t *key_id) |
| Get the PSA key ID of the device private key of a security tag. | |
| int | tls_credential_keygen_csr (sec_tag_t tag, const char *subject, uint8_t *out, size_t out_size, size_t *out_len) |
| Generate a Certificate Signing Request (CSR) for the device private key. | |
| int | tls_credential_keygen_pubkey_get (sec_tag_t tag, uint8_t *out, size_t out_size, size_t *out_len) |
| Export the public key of the device key pair. | |
On-device TLS private key and CSR generation API.