ssh_auth_password.c File Reference

Password authentication method. More...

#include "ssh/ssh.h"
#include "ssh/ssh_transport.h"
#include "ssh/ssh_auth.h"
#include "ssh/ssh_auth_password.h"
#include "ssh/ssh_packet.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 sshSendUserAuthPasswdChangeReq (SshConnection *connection, const char_t *prompt)
 Send SSH_MSG_USERAUTH_PASSWD_CHANGEREQ message. More...
 
error_t sshFormatPasswordAuthParams (SshConnection *connection, uint8_t *p, size_t *written)
 Format "password" method specific fields. More...
 
error_t sshFormatUserAuthPasswdChangeReq (SshConnection *connection, const char_t *prompt, uint8_t *p, size_t *length)
 Format SSH_MSG_USERAUTH_PASSWD_CHANGEREQ message. More...
 
error_t sshParsePasswordAuthParams (SshConnection *connection, const SshString *userName, const uint8_t *p, size_t length)
 Parse "password" method specific fields. More...
 
error_t sshParseUserAuthPasswdChangeReq (SshConnection *connection, const uint8_t *message, size_t length)
 Parse SSH_MSG_USERAUTH_PASSWD_CHANGEREQ message. More...
 

Detailed Description

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

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

Definition in file ssh_auth_password.c.

Macro Definition Documentation

◆ TRACE_LEVEL

#define TRACE_LEVEL   SSH_TRACE_LEVEL

Definition at line 32 of file ssh_auth_password.c.

Function Documentation

◆ sshFormatPasswordAuthParams()

error_t sshFormatPasswordAuthParams ( SshConnection connection,
uint8_t *  p,
size_t *  written 
)

Format "password" method specific fields.

Parameters
[in]connectionPointer to the SSH connection
[out]pOutput stream where to write the method specific fields
[out]writtenTotal number of bytes that have been written
Returns
Error code

Definition at line 104 of file ssh_auth_password.c.

◆ sshFormatUserAuthPasswdChangeReq()

error_t sshFormatUserAuthPasswdChangeReq ( SshConnection connection,
const char_t prompt,
uint8_t *  p,
size_t *  length 
)

Format SSH_MSG_USERAUTH_PASSWD_CHANGEREQ message.

Parameters
[in]connectionPointer to the SSH connection
[in]promptNULL-terminated string containing the prompt message
[out]pBuffer where to format the message
[out]lengthLength of the resulting message, in bytes
Returns
Error code

Definition at line 158 of file ssh_auth_password.c.

◆ sshParsePasswordAuthParams()

error_t sshParsePasswordAuthParams ( SshConnection connection,
const SshString userName,
const uint8_t *  p,
size_t  length 
)

Parse "password" method specific fields.

Parameters
[in]connectionPointer to the SSH connection
[in]userNamePointer to the user name
[in]pPointer to method specific fields
[in]lengthLength of the method specific fields, in bytes
Returns
Error code

Definition at line 212 of file ssh_auth_password.c.

◆ sshParseUserAuthPasswdChangeReq()

error_t sshParseUserAuthPasswdChangeReq ( SshConnection connection,
const uint8_t *  message,
size_t  length 
)

Parse SSH_MSG_USERAUTH_PASSWD_CHANGEREQ message.

Parameters
[in]connectionPointer to the SSH connection
[in]messagePointer to message
[in]lengthLength of the message, in bytes
Returns
Error code

Definition at line 354 of file ssh_auth_password.c.

◆ sshSendUserAuthPasswdChangeReq()

error_t sshSendUserAuthPasswdChangeReq ( SshConnection connection,
const char_t prompt 
)

Send SSH_MSG_USERAUTH_PASSWD_CHANGEREQ message.

Parameters
[in]connectionPointer to the SSH connection
[in]promptNULL-terminated string containing the prompt message
Returns
Error code

Definition at line 54 of file ssh_auth_password.c.