ssh_key_verify.h File Reference

SSH host key verification. More...

#include "ssh.h"

Go to the source code of this file.

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-2024 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.

Author
Oryx Embedded SARL (www.oryx-embedded.com)
Version
2.4.0

Definition in file ssh_key_verify.h.

Function Documentation

◆ sshVerifyClientHostKey()

error_t sshVerifyClientHostKey ( SshConnection connection,
const SshString publicKeyAlgo,
const SshBinaryString hostKey 
)

Verify client's host key.

Parameters
[in]connectionPointer to the SSH connection
[in]publicKeyAlgoPublic key algorithm
[in]hostKeyClient'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]hostKeyHost key to be checked
[in]hostKeyLenLength of the host key, in bytes
[in]trustedKeyTrusted host key (SSH2 or OpenSSH format)
[in]trustedKeyLenLength 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]connectionPointer to the SSH connection
[in]publicKeyAlgoPublic key algorithm
[in]hostKeyServer's host key
Returns
Error code

Definition at line 172 of file ssh_key_verify.c.