|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Enumerations | |
| enum | ssh_host_key_type { SSH_HOST_KEY_TYPE_RSA } |
| Types of host keys that can be generated. More... | |
| enum | ssh_host_key_format { SSH_HOST_KEY_FORMAT_DER , SSH_HOST_KEY_FORMAT_PEM } |
| Formats that SSH host keys can be exported/imported in. More... | |
Functions | |
| int | ssh_keygen (int key_index, enum ssh_host_key_type key_type, size_t key_size_bits) |
| Generate a new SSH host key. | |
| int | ssh_keygen_export (int key_index, bool private_key, enum ssh_host_key_format fmt, void *buf, size_t buf_len) |
| Export a generated SSH host key. | |
| int | ssh_keygen_import (int key_index, bool private_key, enum ssh_host_key_format fmt, const void *buf, size_t buf_len) |
| Import an SSH host key. | |
| int | ssh_keygen_free (int key_index) |
| Free a generated SSH host key. | |
| enum ssh_host_key_format |
#include <zephyr/net/ssh/keygen.h>
Formats that SSH host keys can be exported/imported in.
| Enumerator | |
|---|---|
| SSH_HOST_KEY_FORMAT_DER | DER format. |
| SSH_HOST_KEY_FORMAT_PEM | PEM format. |
| enum ssh_host_key_type |
#include <zephyr/net/ssh/keygen.h>
Types of host keys that can be generated.
| Enumerator | |
|---|---|
| SSH_HOST_KEY_TYPE_RSA | RSA host key type. |
| int ssh_keygen | ( | int | key_index, |
| enum ssh_host_key_type | key_type, | ||
| size_t | key_size_bits ) |
#include <zephyr/net/ssh/keygen.h>
Generate a new SSH host key.
| key_index | Index of the key to generate. Must be between 0 and CONFIG_SSH_MAX_HOST_KEYS - 1 |
| key_type | Type of key to generate |
| key_size_bits | Size of the key to generate, in bits. For RSA keys, this must be at least 2048 |
| int ssh_keygen_export | ( | int | key_index, |
| bool | private_key, | ||
| enum ssh_host_key_format | fmt, | ||
| void * | buf, | ||
| size_t | buf_len ) |
#include <zephyr/net/ssh/keygen.h>
Export a generated SSH host key.
| key_index | Index of the key to export. Must be between 0 and CONFIG_SSH_MAX_HOST_KEYS - 1 |
| private_key | Whether to export the private key (true) or public key (false) |
| fmt | Format to export the key in |
| buf | Buffer to write the exported key to |
| buf_len | Length of the buffer, in bytes |
| int ssh_keygen_free | ( | int | key_index | ) |
#include <zephyr/net/ssh/keygen.h>
Free a generated SSH host key.
| key_index | Index of the key to free. Must be between 0 and CONFIG_SSH_MAX_HOST_KEYS - 1 |
| int ssh_keygen_import | ( | int | key_index, |
| bool | private_key, | ||
| enum ssh_host_key_format | fmt, | ||
| const void * | buf, | ||
| size_t | buf_len ) |
#include <zephyr/net/ssh/keygen.h>
Import an SSH host key.
| key_index | Index of the key to import. Must be between 0 and CONFIG_SSH_MAX_HOST_KEYS - 1 |
| private_key | Whether the key being imported is a private key (true) or a public key (false) |
| fmt | Format the key is in |
| buf | Buffer containing the key to import |
| buf_len | Length of the buffer, in bytes |