Public key authentication method. More...
#include "ssh/ssh.h"
#include "ssh/ssh_algorithms.h"
#include "ssh/ssh_transport.h"
#include "ssh/ssh_auth.h"
#include "ssh/ssh_auth_public_key.h"
#include "ssh/ssh_packet.h"
#include "ssh/ssh_key_parse.h"
#include "ssh/ssh_key_verify.h"
#include "ssh/ssh_cert_parse.h"
#include "ssh/ssh_cert_verify.h"
#include "ssh/ssh_sign_generate.h"
#include "ssh/ssh_sign_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 | sshSendUserAuthPkOk (SshConnection *connection, const SshString *publicKeyAlgo, const SshBinaryString *publicKey) |
Send SSH_MSG_USERAUTH_PK_OK message. More... | |
error_t | sshFormatPublicKeyAuthParams (SshConnection *connection, const uint8_t *message, size_t messageLen, uint8_t *p, size_t *written) |
Format "publickey" method specific fields. More... | |
error_t | sshFormatUserAuthPkOk (SshConnection *connection, const SshString *publicKeyAlgo, const SshBinaryString *publicKey, uint8_t *p, size_t *length) |
Format SSH_MSG_USERAUTH_PK_OK message. More... | |
error_t | sshParsePublicKeyAuthParams (SshConnection *connection, const SshString *userName, const uint8_t *message, const uint8_t *p, size_t length) |
Parse "publickey" method specific fields. More... | |
error_t | sshParseUserAuthPkOk (SshConnection *connection, const uint8_t *message, size_t length) |
Parse SSH_MSG_USERAUTH_PK_OK message. More... | |
Detailed Description
Public key authentication method.
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.
- Version
- 2.4.4
Definition in file ssh_auth_public_key.c.
Macro Definition Documentation
◆ TRACE_LEVEL
#define TRACE_LEVEL SSH_TRACE_LEVEL |
Definition at line 32 of file ssh_auth_public_key.c.
Function Documentation
◆ sshFormatPublicKeyAuthParams()
error_t sshFormatPublicKeyAuthParams | ( | SshConnection * | connection, |
const uint8_t * | message, | ||
size_t | messageLen, | ||
uint8_t * | p, | ||
size_t * | written | ||
) |
Format "publickey" method specific fields.
- Parameters
-
[in] connection Pointer to the SSH connection [in] message Pointer to the message to be signed [out] messageLen Length of the message, in bytes [out] p Output stream where to write the method specific fields [out] written Total number of bytes that have been written
- Returns
- Error code
Definition at line 107 of file ssh_auth_public_key.c.
◆ sshFormatUserAuthPkOk()
error_t sshFormatUserAuthPkOk | ( | SshConnection * | connection, |
const SshString * | publicKeyAlgo, | ||
const SshBinaryString * | publicKey, | ||
uint8_t * | p, | ||
size_t * | length | ||
) |
Format SSH_MSG_USERAUTH_PK_OK message.
- Parameters
-
[in] connection Pointer to the SSH connection [in] publicKeyAlgo Public key algorithm name [in] publicKey Public key blob from the authentication request [out] p Buffer where to format the message [out] length Length of the resulting message, in bytes
- Returns
- Error code
Definition at line 215 of file ssh_auth_public_key.c.
◆ sshParsePublicKeyAuthParams()
error_t sshParsePublicKeyAuthParams | ( | SshConnection * | connection, |
const SshString * | userName, | ||
const uint8_t * | message, | ||
const uint8_t * | p, | ||
size_t | length | ||
) |
Parse "publickey" method specific fields.
- Parameters
-
[in] connection Pointer to the SSH connection [in] userName Pointer to the user name [in] message Pointer to the SSH_MSG_USERAUTH_REQUEST message [in] p Pointer to method specific fields [in] length Length of the method specific fields, in bytes
- Returns
- Error code
Definition at line 272 of file ssh_auth_public_key.c.
◆ sshParseUserAuthPkOk()
error_t sshParseUserAuthPkOk | ( | SshConnection * | connection, |
const uint8_t * | message, | ||
size_t | length | ||
) |
Parse SSH_MSG_USERAUTH_PK_OK message.
- Parameters
-
[in] connection Pointer to the SSH connection [in] message Pointer to message [in] length Length of the message, in bytes
- Returns
- Error code
Definition at line 443 of file ssh_auth_public_key.c.
◆ sshSendUserAuthPkOk()
error_t sshSendUserAuthPkOk | ( | SshConnection * | connection, |
const SshString * | publicKeyAlgo, | ||
const SshBinaryString * | publicKey | ||
) |
Send SSH_MSG_USERAUTH_PK_OK message.
- Parameters
-
[in] connection Pointer to the SSH connection [in] publicKeyAlgo Public key algorithm name [in] publicKey Public key blob from the authentication request
- Returns
- Error code
Definition at line 62 of file ssh_auth_public_key.c.