SSH host key verification. More...
#include "ssh/ssh.h"#include "ssh/ssh_algorithms.h"#include "ssh/ssh_key_import.h"#include "ssh/ssh_key_parse.h"#include "ssh/ssh_key_verify.h"#include "ssh/ssh_misc.h"#include "debug.h"Go to the source code of this file.
| Macros | |
| #define | TRACE_LEVEL SSH_TRACE_LEVEL | 
| Functions | |
| error_t | sshVerifyHostKey (const uint8_t *hostKey, size_t hostKeyLen, const char_t *trustedKey, size_t trustedKeyLen) | 
| Check if a host key is trusted.  More... | |
| error_t | sshVerifyClientHostKey (SshConnection *connection, const SshString *publicKeyAlgo, const SshBinaryString *hostKey) | 
| Verify client's host key.  More... | |
| error_t | sshVerifyServerHostKey (SshConnection *connection, const SshString *publicKeyAlgo, const SshBinaryString *hostKey) | 
| Verify server's host key.  More... | |
Detailed Description
SSH host key verification.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2019-2025 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneSSH Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.5.4
Definition in file ssh_key_verify.c.
Macro Definition Documentation
◆ TRACE_LEVEL
| #define TRACE_LEVEL SSH_TRACE_LEVEL | 
Definition at line 32 of file ssh_key_verify.c.
Function Documentation
◆ sshVerifyClientHostKey()
| error_t sshVerifyClientHostKey | ( | SshConnection * | connection, | 
| const SshString * | publicKeyAlgo, | ||
| const SshBinaryString * | hostKey | ||
| ) | 
Verify client's host key.
- Parameters
- 
  [in] connection Pointer to the SSH connection [in] publicKeyAlgo Public key algorithm [in] hostKey Client's host key 
- Returns
- Error code
Definition at line 117 of file ssh_key_verify.c.
◆ sshVerifyHostKey()
| error_t sshVerifyHostKey | ( | const uint8_t * | hostKey, | 
| size_t | hostKeyLen, | ||
| const char_t * | trustedKey, | ||
| size_t | trustedKeyLen | ||
| ) | 
Check if a host key is trusted.
- Parameters
- 
  [in] hostKey Host key to be checked [in] hostKeyLen Length of the host key, in bytes [in] trustedKey Trusted host key (SSH2 or OpenSSH format) [in] trustedKeyLen Length of the trusted host key 
- Returns
- Error code
Definition at line 56 of file ssh_key_verify.c.
◆ sshVerifyServerHostKey()
| error_t sshVerifyServerHostKey | ( | SshConnection * | connection, | 
| const SshString * | publicKeyAlgo, | ||
| const SshBinaryString * | hostKey | ||
| ) | 
Verify server's host key.
- Parameters
- 
  [in] connection Pointer to the SSH connection [in] publicKeyAlgo Public key algorithm [in] hostKey Server's host key 
- Returns
- Error code
Definition at line 172 of file ssh_key_verify.c.
