|
typedef error_t(* | SshHostKeyVerifyCallback) (SshConnection *connection, const uint8_t *hostKey, size_t hostKeyLen) |
| Host key verification callback function. More...
|
|
typedef error_t(* | SshCertVerifyCallback) (SshConnection *connection, const SshCertificate *cert) |
| Certificate verification callback function. More...
|
|
typedef error_t(* | SshCaPublicKeyVerifyCallback) (SshConnection *connection, const uint8_t *publicKey, size_t publicKeyLen) |
| CA public key verification callback function. More...
|
|
typedef error_t(* | SshPublicKeyAuthCallback) (SshConnection *connection, const char_t *user, const uint8_t *publicKey, size_t publicKeyLen) |
| Public key authentication callback function. More...
|
|
typedef error_t(* | SshCertAuthCallback) (SshConnection *connection, const char_t *user, const SshCertificate *cert) |
| Certificate authentication callback function. More...
|
|
typedef SshAuthStatus(* | SshPasswordAuthCallback) (SshConnection *connection, const char_t *user, const char_t *password, size_t passwordLen) |
| Password authentication callback function. More...
|
|
typedef SshAuthStatus(* | SshPasswordChangeCallback) (SshConnection *connection, const char_t *user, const char_t *oldPassword, size_t oldPasswordLen, const char_t *newPassword, size_t newPasswordLen) |
| Password change callback function. More...
|
|
typedef error_t(* | SshSignGenCallback) (SshConnection *connection, const char_t *publicKeyAlgo, const SshHostKey *hostKey, const SshBinaryString *sessionId, const SshBinaryString *message, uint8_t *p, size_t *written) |
| Signature generation callback function. More...
|
|
typedef error_t(* | SshSignVerifyCallback) (SshConnection *connection, const SshString *publicKeyAlgo, const SshBinaryString *publicKeyBlob, const SshBinaryString *sessionId, const SshBinaryString *message, const SshBinaryString *signatureBlob) |
| Signature verification callback function. More...
|
|
typedef error_t(* | SshEcdhKeyPairGenCallback) (SshConnection *connection, const char_t *kexAlgo, EcPublicKey *publicKey) |
| ECDH key pair generation callback. More...
|
|
typedef error_t(* | SshEcdhSharedSecretCalcCallback) (SshConnection *connection, const char_t *kexAlgo, const EcPublicKey *publicKey, uint8_t *output, size_t *outputLen) |
| ECDH shared secret calculation callback. More...
|
|
typedef error_t(* | SshGlobalReqCallback) (SshConnection *connection, const SshString *name, const uint8_t *data, size_t length, void *param) |
| Global request callback function. More...
|
|
typedef error_t(* | SshChannelReqCallback) (SshChannel *channel, const SshString *type, const uint8_t *data, size_t length, void *param) |
| Channel request callback function. More...
|
|
typedef error_t(* | SshChannelOpenCallback) (SshConnection *connection, const SshString *type, uint32_t senderChannel, uint32_t initialWindowSize, uint32_t maxPacketSize, const uint8_t *data, size_t length, void *param) |
| Channel open callback function. More...
|
|
typedef error_t(* | SshConnectionOpenCallback) (SshConnection *connection, void *param) |
| Connection open callback function. More...
|
|
typedef void(* | SshConnectionCloseCallback) (SshConnection *connection, void *param) |
| Connection close callback function. More...
|
|
typedef void(* | SshKeyLogCallback) (SshConnection *connection, const char_t *key) |
| Key logging callback function (for debugging purpose only) More...
|
|
|
enum | SshOperationMode { SSH_OPERATION_MODE_CLIENT = 0,
SSH_OPERATION_MODE_SERVER = 1
} |
| Mode of operation. More...
|
|
enum | SshAuthStatus { SSH_AUTH_STATUS_FAILURE = 0,
SSH_AUTH_STATUS_SUCCESS = 1,
SSH_AUTH_STATUS_PASSWORD_EXPIRED = 2
} |
| Authentication status. More...
|
|
enum | SshChannelFlags {
SSH_FLAG_EOF = 0x0100,
SSH_FLAG_WAIT_ALL = 0x0800,
SSH_FLAG_BREAK_CHAR = 0x1000,
SSH_FLAG_BREAK_CRLF = 0x100A,
SSH_FLAG_NO_DELAY = 0x4000,
SSH_FLAG_DELAY = 0x8000
} |
| Flags used by read and write functions. More...
|
|
enum | SshMessageType {
SSH_MSG_INVALID = 0,
SSH_MSG_DISCONNECT = 1,
SSH_MSG_IGNORE = 2,
SSH_MSG_UNIMPLEMENTED = 3,
SSH_MSG_DEBUG = 4,
SSH_MSG_SERVICE_REQUEST = 5,
SSH_MSG_SERVICE_ACCEPT = 6,
SSH_MSG_EXT_INFO = 7,
SSH_MSG_NEWCOMPRESS = 8,
SSH_MSG_KEXINIT = 20,
SSH_MSG_NEWKEYS = 21,
SSH_MSG_KEX_MIN = 30,
SSH_MSG_KEX_MAX = 49,
SSH_MSG_KEXRSA_PUBKEY = 30,
SSH_MSG_KEXRSA_SECRET = 31,
SSH_MSG_KEXRSA_DONE = 32,
SSH_MSG_KEX_DH_INIT = 30,
SSH_MSG_KEX_DH_REPLY = 31,
SSH_MSG_KEX_DH_GEX_REQUEST_OLD = 30,
SSH_MSG_KEX_DH_GEX_REQUEST = 34,
SSH_MSG_KEX_DH_GEX_GROUP = 31,
SSH_MSG_KEX_DH_GEX_INIT = 32,
SSH_MSG_KEX_DH_GEX_REPLY = 33,
SSH_MSG_KEX_ECDH_INIT = 30,
SSH_MSG_KEX_ECDH_REPLY = 31,
SSH_MSG_KEX_HYBRID_INIT = 30,
SSH_MSG_KEX_HYBRID_REPLY = 31,
SSH_MSG_USERAUTH_REQUEST = 50,
SSH_MSG_USERAUTH_FAILURE = 51,
SSH_MSG_USERAUTH_SUCCESS = 52,
SSH_MSG_USERAUTH_BANNER = 53,
SSH_MSG_USERAUTH_MIN = 60,
SSH_MSG_USERAUTH_MAX = 79,
SSH_MSG_USERAUTH_PK_OK = 60,
SSH_MSG_USERAUTH_PASSWD_CHANGEREQ = 60,
SSH_MSG_USERAUTH_INFO_REQUEST = 60,
SSH_MSG_USERAUTH_INFO_RESPONSE = 61,
SSH_MSG_GLOBAL_REQUEST = 80,
SSH_MSG_REQUEST_SUCCESS = 81,
SSH_MSG_REQUEST_FAILURE = 82,
SSH_MSG_CHANNEL_OPEN = 90,
SSH_MSG_CHANNEL_OPEN_CONFIRMATION = 91,
SSH_MSG_CHANNEL_OPEN_FAILURE = 92,
SSH_MSG_CHANNEL_WINDOW_ADJUST = 93,
SSH_MSG_CHANNEL_DATA = 94,
SSH_MSG_CHANNEL_EXTENDED_DATA = 95,
SSH_MSG_CHANNEL_EOF = 96,
SSH_MSG_CHANNEL_CLOSE = 97,
SSH_MSG_CHANNEL_REQUEST = 98,
SSH_MSG_CHANNEL_SUCCESS = 99,
SSH_MSG_CHANNEL_FAILURE = 100,
SSH_MSG_PING = 192,
SSH_MSG_PONG = 193
} |
| SSH message types. More...
|
|
enum | SshDisconnectReasonCode {
SSH_DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECT = 1,
SSH_DISCONNECT_PROTOCOL_ERROR = 2,
SSH_DISCONNECT_KEY_EXCHANGE_FAILED = 3,
SSH_DISCONNECT_RESERVED = 4,
SSH_DISCONNECT_MAC_ERROR = 5,
SSH_DISCONNECT_COMPRESSION_ERROR = 6,
SSH_DISCONNECT_SERVICE_NOT_AVAILABLE = 7,
SSH_DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED = 8,
SSH_DISCONNECT_HOST_KEY_NOT_VERIFIABLE = 9,
SSH_DISCONNECT_CONNECTION_LOST = 10,
SSH_DISCONNECT_BY_APPLICATION = 11,
SSH_DISCONNECT_TOO_MANY_CONNECTIONS = 12,
SSH_DISCONNECT_AUTH_CANCELLED_BY_USER = 13,
SSH_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE = 14,
SSH_DISCONNECT_ILLEGAL_USER_NAME = 15
} |
| Disconnection messages reason codes. More...
|
|
enum | SshOpenFailureReasonCode { SSH_OPEN_ADMINISTRATIVELY_PROHIBITED = 1,
SSH_OPEN_CONNECT_FAILED = 2,
SSH_OPEN_UNKNOWN_CHANNEL_TYPE = 3,
SSH_OPEN_RESOURCE_SHORTAGE = 4
} |
| Channel connection failure reason codes. More...
|
|
enum | SshConnectionState {
SSH_CONN_STATE_CLOSED = 0,
SSH_CONN_STATE_CLIENT_ID = 1,
SSH_CONN_STATE_SERVER_ID = 2,
SSH_CONN_STATE_CLIENT_KEX_INIT = 3,
SSH_CONN_STATE_SERVER_KEX_INIT = 4,
SSH_CONN_STATE_KEX_RSA_PUB_KEY = 5,
SSH_CONN_STATE_KEX_RSA_SECRET = 6,
SSH_CONN_STATE_KEX_RSA_DONE = 7,
SSH_CONN_STATE_KEX_DH_INIT = 8,
SSH_CONN_STATE_KEX_DH_REPLY = 9,
SSH_CONN_STATE_KEX_DH_GEX_REQUEST = 10,
SSH_CONN_STATE_KEX_DH_GEX_GROUP = 11,
SSH_CONN_STATE_KEX_DH_GEX_INIT = 12,
SSH_CONN_STATE_KEX_DH_GEX_REPLY = 13,
SSH_CONN_STATE_KEX_ECDH_INIT = 14,
SSH_CONN_STATE_KEX_ECDH_REPLY = 15,
SSH_CONN_STATE_KEX_HYBRID_INIT = 16,
SSH_CONN_STATE_KEX_HYBRID_REPLY = 17,
SSH_CONN_STATE_CLIENT_NEW_KEYS = 18,
SSH_CONN_STATE_SERVER_NEW_KEYS = 19,
SSH_CONN_STATE_CLIENT_EXT_INFO = 20,
SSH_CONN_STATE_SERVER_EXT_INFO_1 = 21,
SSH_CONN_STATE_SERVER_EXT_INFO_2 = 22,
SSH_CONN_STATE_SERVICE_REQUEST = 23,
SSH_CONN_STATE_SERVICE_ACCEPT = 24,
SSH_CONN_STATE_USER_AUTH_BANNER = 25,
SSH_CONN_STATE_USER_AUTH_REQUEST = 26,
SSH_CONN_STATE_USER_AUTH_REPLY = 27,
SSH_CONN_STATE_USER_AUTH_SUCCESS = 28,
SSH_CONN_STATE_OPEN = 29,
SSH_CONN_STATE_DISCONNECT = 30
} |
| SSH connection state. More...
|
|
enum | SshChannelState { SSH_CHANNEL_STATE_UNUSED = 0,
SSH_CHANNEL_STATE_RESERVED = 1,
SSH_CHANNEL_STATE_OPEN = 2,
SSH_CHANNEL_STATE_CLOSED = 3
} |
| SSH channel state. More...
|
|
enum | SshRequestState { SSH_REQUEST_STATE_IDLE = 0,
SSH_REQUEST_STATE_PENDING = 1,
SSH_REQUEST_STATE_SUCCESS = 2,
SSH_REQUEST_STATE_FAILURE = 3
} |
| SSH request states. More...
|
|
enum | SshChannelEvent {
SSH_CHANNEL_EVENT_TIMEOUT = 0x0000,
SSH_CHANNEL_EVENT_CONNECTED = 0x0001,
SSH_CHANNEL_EVENT_CLOSED = 0x0002,
SSH_CHANNEL_EVENT_TX_READY = 0x0004,
SSH_CHANNEL_EVENT_TX_DONE = 0x0008,
SSH_CHANNEL_EVENT_TX_ACKED = 0x0010,
SSH_CHANNEL_EVENT_TX_SHUTDOWN = 0x0020,
SSH_CHANNEL_EVENT_RX_READY = 0x0040,
SSH_CHANNEL_EVENT_RX_SHUTDOWN = 0x0080
} |
| SSH channel events. More...
|
|
|
error_t | sshInit (SshContext *context, SshConnection *connections, uint_t numConnections, SshChannel *channels, uint_t numChannels) |
| SSH context initialization. More...
|
|
error_t | sshSetOperationMode (SshContext *context, SshOperationMode mode) |
| Set operation mode (client or server) More...
|
|
error_t | sshSetPrng (SshContext *context, const PrngAlgo *prngAlgo, void *prngContext) |
| Set the pseudo-random number generator to be used. More...
|
|
error_t | sshSetUsername (SshContext *context, const char_t *username) |
| Set the user name to be used for authentication. More...
|
|
error_t | sshSetPassword (SshContext *context, const char_t *password) |
| Set the password to be used for authentication. More...
|
|
error_t | sshRegisterHostKeyVerifyCallback (SshContext *context, SshHostKeyVerifyCallback callback) |
| Register host key verification callback function. More...
|
|
error_t | sshRegisterCertVerifyCallback (SshContext *context, SshCertVerifyCallback callback) |
| Register certificate verification callback function. More...
|
|
error_t | sshRegisterCaPublicKeyVerifyCallback (SshContext *context, SshCaPublicKeyVerifyCallback callback) |
| Register CA public key verification callback function. More...
|
|
error_t | sshRegisterPublicKeyAuthCallback (SshContext *context, SshPublicKeyAuthCallback callback) |
| Register public key authentication callback function. More...
|
|
error_t | sshRegisterCertAuthCallback (SshContext *context, SshCertAuthCallback callback) |
| Register certificate authentication callback function. More...
|
|
error_t | sshRegisterPasswordAuthCallback (SshContext *context, SshPasswordAuthCallback callback) |
| Register password authentication callback function. More...
|
|
error_t | sshRegisterPasswordChangeCallback (SshContext *context, SshPasswordChangeCallback callback) |
| Register password change callback function. More...
|
|
error_t | sshRegisterSignGenCallback (SshContext *context, SshSignGenCallback callback) |
| Register signature generation callback function. More...
|
|
error_t | sshRegisterSignVerifyCallback (SshContext *context, SshSignVerifyCallback callback) |
| Register signature verification callback function. More...
|
|
error_t | sshRegisterEcdhKeyPairGenCallback (SshContext *context, SshEcdhKeyPairGenCallback callback) |
| Register ECDH key pair generation callback function. More...
|
|
error_t | sshRegisterEcdhSharedSecretCalcCallback (SshContext *context, SshEcdhSharedSecretCalcCallback callback) |
| Register ECDH shared secret calculation callback function. More...
|
|
error_t | sshRegisterGlobalRequestCallback (SshContext *context, SshGlobalReqCallback callback, void *param) |
| Register global request callback function. More...
|
|
error_t | sshUnregisterGlobalRequestCallback (SshContext *context, SshGlobalReqCallback callback) |
| Unregister global request callback function. More...
|
|
error_t | sshRegisterChannelRequestCallback (SshContext *context, SshChannelReqCallback callback, void *param) |
| Register channel request callback function. More...
|
|
error_t | sshUnregisterChannelRequestCallback (SshContext *context, SshChannelReqCallback callback) |
| Unregister channel request callback function. More...
|
|
error_t | sshRegisterChannelOpenCallback (SshContext *context, SshChannelOpenCallback callback, void *param) |
| Register channel open callback function. More...
|
|
error_t | sshUnregisterChannelOpenCallback (SshContext *context, SshChannelOpenCallback callback) |
| Unregister channel open callback function. More...
|
|
error_t | sshRegisterConnectionOpenCallback (SshContext *context, SshConnectionOpenCallback callback, void *param) |
| Register connection open callback function. More...
|
|
error_t | sshUnregisterConnectionOpenCallback (SshContext *context, SshConnectionOpenCallback callback) |
| Unregister connection open callback function. More...
|
|
error_t | sshRegisterConnectionCloseCallback (SshContext *context, SshConnectionCloseCallback callback, void *param) |
| Register connection close callback function. More...
|
|
error_t | sshUnregisterConnectionCloseCallback (SshContext *context, SshConnectionCloseCallback callback) |
| Unregister connection close callback function. More...
|
|
error_t | sshRegisterKeyLogCallback (SshContext *context, SshKeyLogCallback callback) |
| Register key logging callback function (for debugging purpose only) More...
|
|
error_t | sshLoadRsaKey (SshContext *context, uint_t index, const char_t *publicKey, size_t publicKeyLen, const char_t *privateKey, size_t privateKeyLen, const char_t *password) |
| Load transient RSA key (for RSA key exchange) More...
|
|
error_t | sshUnloadRsaKey (SshContext *context, uint_t index) |
| Unload transient RSA key (for RSA key exchange) More...
|
|
error_t | sshLoadDhGexGroup (SshContext *context, uint_t index, const char_t *dhParams, size_t dhParamsLen) |
| Load Diffie-Hellman group. More...
|
|
error_t | sshUnloadDhGexGroup (SshContext *context, uint_t index) |
| Unload Diffie-Hellman group. More...
|
|
error_t | sshLoadHostKey (SshContext *context, uint_t index, const char_t *publicKey, size_t publicKeyLen, const char_t *privateKey, size_t privateKeyLen, const char_t *password) |
| Load entity's host key. More...
|
|
error_t | sshUnloadHostKey (SshContext *context, uint_t index) |
| Unload entity's host key. More...
|
|
error_t | sshLoadCertificate (SshContext *context, uint_t index, const char_t *cert, size_t certLen, const char_t *privateKey, size_t privateKeyLen, const char_t *password) |
| Load entity's certificate. More...
|
|
error_t | sshUnloadCertificate (SshContext *context, uint_t index) |
| Unload entity's certificate. More...
|
|
error_t | sshSetPasswordChangePrompt (SshConnection *connection, const char_t *prompt) |
| Set password change prompt message. More...
|
|
SshChannel * | sshCreateChannel (SshConnection *connection) |
| Create a new SSH channel. More...
|
|
error_t | sshSetChannelTimeout (SshChannel *channel, systime_t timeout) |
| Set timeout for read/write operations. More...
|
|
error_t | sshWriteChannel (SshChannel *channel, const void *data, size_t length, size_t *written, uint_t flags) |
| Write data to the specified channel. More...
|
|
error_t | sshReadChannel (SshChannel *channel, void *data, size_t size, size_t *received, uint_t flags) |
| Receive data from the specified channel. More...
|
|
error_t | sshPollChannels (SshChannelEventDesc *eventDesc, uint_t size, OsEvent *extEvent, systime_t timeout) |
| Wait for one of a set of channels to become ready to perform I/O. More...
|
|
error_t | sshCloseChannel (SshChannel *channel) |
| Close channel. More...
|
|
void | sshDeleteChannel (SshChannel *channel) |
| Release channel. More...
|
|
void | sshDeinit (SshContext *context) |
| Release SSH context. More...
|
|
Secure Shell (SSH)
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.4
Definition in file ssh.h.