Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
keygen.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Grant Ramsay <grant.ramsay@hotmail.com>
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_NET_SSH_KEYGEN_H_
8#define ZEPHYR_INCLUDE_NET_SSH_KEYGEN_H_
9
21
22#include <zephyr/kernel.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
33
41
53int ssh_keygen(int key_index,
54 enum ssh_host_key_type key_type,
55 size_t key_size_bits);
56
71int ssh_keygen_export(int key_index,
72 bool private_key,
73 enum ssh_host_key_format fmt,
74 void *buf,
75 size_t buf_len);
76
90int ssh_keygen_import(int key_index,
91 bool private_key,
92 enum ssh_host_key_format fmt,
93 const void *buf,
94 size_t buf_len);
95
104int ssh_keygen_free(int key_index);
105
106#ifdef __cplusplus
107}
108#endif
109
113
114#endif /* ZEPHYR_INCLUDE_NET_SSH_KEYGEN_H_ */
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.
ssh_host_key_type
Types of host keys that can be generated.
Definition keygen.h:29
int ssh_keygen(int key_index, enum ssh_host_key_type key_type, size_t key_size_bits)
Generate a new SSH host key.
ssh_host_key_format
Formats that SSH host keys can be exported/imported in.
Definition keygen.h:35
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.
@ SSH_HOST_KEY_TYPE_RSA
RSA host key type.
Definition keygen.h:31
@ SSH_HOST_KEY_FORMAT_DER
DER format.
Definition keygen.h:37
@ SSH_HOST_KEY_FORMAT_PEM
PEM format.
Definition keygen.h:39
Public kernel APIs.