cryptlib  3.4.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
Classes | Macros | Typedefs | Enumerations | Functions | Variables
ssh.h File Reference

Go to the source code of this file.

Classes

struct  ALGO_STRING_INFO
 
struct  SH
 

Macros

#define SSH_PORT   22
 
#define ID_SIZE   1 /* ID byte */
 
#define LENGTH_SIZE   4 /* Size of packet length field */
 
#define UINT_SIZE   4 /* Size of integer value */
 
#define PADLENGTH_SIZE   1 /* Size of padding length field */
 
#define BOOLEAN_SIZE   1 /* Size of boolean value */
 
#define SSH1_COOKIE_SIZE   8 /* Size of SSHv1 cookie */
 
#define SSH1_HEADER_SIZE   5 /* Size of SSHv1 packet header */
 
#define SSH1_CRC_SIZE   4 /* Size of CRC value */
 
#define SSH1_MPI_LENGTH_SIZE   2 /* Size of MPI length field */
 
#define SSH1_SESSIONID_SIZE   16 /* Size of SSHv1 session ID */
 
#define SSH1_SECRET_SIZE   32 /* Size of SSHv1 shared secret */
 
#define SSH1_CHALLENGE_SIZE   32 /* Size of SSHv1 RSA auth.challenge */
 
#define SSH1_RESPONSE_SIZE   16 /* Size of SSHv1 RSA auth.response */
 
#define SSH2_COOKIE_SIZE   16 /* Size of SSHv2 cookie */
 
#define SSH2_HEADER_SIZE   5 /* Size of SSHv2 packet header */
 
#define SSH2_MIN_ALGOID_SIZE   4 /* Size of shortest SSHv2 algo.name */
 
#define SSH2_MIN_PADLENGTH_SIZE   4 /* Minimum amount of padding for packets */
 
#define SSH2_PAYLOAD_HEADER_SIZE   9 /* Size of SSHv2 inner payload header */
 
#define SSH2_FIXED_KEY_SIZE   16 /* Size of SSHv2 fixed-size keys */
 
#define SSH2_DEFAULT_KEYSIZE   128 /* Size of SSHv2 default DH key */
 
#define MAX_PACKET_SIZE   262144L
 
#define EXTRA_PACKET_SIZE   512
 
#define DEFAULT_PACKET_SIZE   16384
 
#define MAX_WINDOW_SIZE   ( MAX_INTLENGTH - 8192 )
 
#define SSH_PFLAG_NONE   0x0000/* No protocol-specific flags */
 
#define SSH_PFLAG_HMACKEYSIZE   0x0001/* Peer uses short HMAC keys */
 
#define SSH_PFLAG_SIGFORMAT   0x0002/* Peer omits signature algo name */
 
#define SSH_PFLAG_NOHASHSECRET   0x0004/* Peer omits secret in key derive */
 
#define SSH_PFLAG_NOHASHLENGTH   0x0008/* Peer omits length in exchange hash */
 
#define SSH_PFLAG_RSASIGPAD   0x0010/* Peer requires zero-padded RSA sig.*/
 
#define SSH_PFLAG_WINDOWSIZE   0x0020/* Peer mishandles large window sizes */
 
#define SSH_PFLAG_TEXTDIAGS   0x0040/* Peer dumps text diagnostics on error */
 
#define SSH_PFLAG_PAMPW   0x0080/* Peer chokes on "password" as PAM submethod */
 
#define SSH_PFLAG_DUMMYUSERAUTH   0x0100/* Peer requires dummy userAuth message */
 
#define SSH_PFLAG_EMPTYUSERAUTH   0x0200/* Peer sends empty userauth-failure response */
 
#define SSH_PFLAG_ZEROLENIGNORE   0x0400/* Peer sends zero-length SSH_IGNORE */
 
#define SSH_PFLAG_ASYMMCOPR   0x0800/* Peer sends asymmetric compression algos */
 
#define SSH_PFLAG_EMPTYSVCACCEPT   0x1000/* Peer sends empty SSH_SERVICE_ACCEPT */
 
#define SSH_PFLAG_CUTEFTP   0x2000/* CuteFTP, drops conn.during handshake */
 
#define SSH_PFLAG_MAX   0x3FFF/* Maximum possible flag value */
 
#define MIN_PACKET_SIZE   16
 
#define SSH2_HEADER_REMAINDER_SIZE   ( MIN_PACKET_SIZE - LENGTH_SIZE )
 
#define SSH1_MAX_HEADER_SIZE   ( LENGTH_SIZE + 8 + ID_SIZE + LENGTH_SIZE )
 
#define SSH_ID   "SSH-" /* Start of SSH ID */
 
#define SSH_ID_SIZE   4 /* Size of SSH ID */
 
#define SSH_VERSION_SIZE   4 /* Size of SSH version */
 
#define SSH_ID_MAX_SIZE   255 /* Max.size of SSHv2 ID string */
 
#define SSH1_ID_STRING   "SSH-1.5-cryptlib"
 
#define SSH2_ID_STRING   "SSH-2.0-cryptlib" /* cryptlib SSH ID strings */
 
#define SSH_ID_STRING_SIZE   16 /* Size of ID strings */
 
#define SSH1_MSG_DISCONNECT   1 /* Disconnect session */
 
#define SSH1_SMSG_PUBLIC_KEY   2 /* Server public key */
 
#define SSH1_CMSG_SESSION_KEY   3 /* Encrypted session key */
 
#define SSH1_CMSG_USER   4 /* User name */
 
#define SSH1_CMSG_AUTH_RSA   6 /* RSA public key */
 
#define SSH1_SMSG_AUTH_RSA_CHALLENGE   7 /* RSA challenge from server */
 
#define SSH1_CMSG_AUTH_RSA_RESPONSE   8 /* RSA response from client */
 
#define SSH1_CMSG_AUTH_PASSWORD   9 /* Password */
 
#define SSH1_CMSG_REQUEST_PTY   10 /* Request a pty */
 
#define SSH1_CMSG_WINDOW_SIZE   11 /* Terminal window size change */
 
#define SSH1_CMSG_EXEC_SHELL   12 /* Request a shell */
 
#define SSH1_CMSG_EXEC_CMD   13 /* Request command execution */
 
#define SSH1_SMSG_SUCCESS   14 /* Success status message */
 
#define SSH1_SMSG_FAILURE   15 /* Failure status message */
 
#define SSH1_CMSG_STDIN_DATA   16 /* Data from client stdin */
 
#define SSH1_SMSG_STDOUT_DATA   17 /* Data from server stdout */
 
#define SSH1_SMSG_EXITSTATUS   20 /* Exit status of command run on server */
 
#define SSH1_MSG_IGNORE   32 /* No-op */
 
#define SSH1_CMSG_EXIT_CONFIRMATION   33 /* Client response to server exitstatus */
 
#define SSH1_MSG_DEBUG   36 /* Debugging/informational message */
 
#define SSH1_CMSG_MAX_PACKET_SIZE   38 /* Maximum data packet size */
 
#define SSH1_CMSG_PORT_FORWARD_REQUEST   28
 
#define SSH1_CMSG_AGENT_REQUEST_FORWARDING   30
 
#define SSH1_CMSG_X11_REQUEST_FORWARDING   34
 
#define SSH1_CMSG_REQUEST_COMPRESSION   37
 
#define SSH1_CIPHER_NONE   0 /* No encryption */
 
#define SSH1_CIPHER_IDEA   1 /* IDEA/CFB */
 
#define SSH1_CIPHER_DES   2 /* DES/CBC */
 
#define SSH1_CIPHER_3DES   3 /* 3DES/inner-CBC (nonstandard) */
 
#define SSH1_CIPHER_TSS   4 /* Deprecated */
 
#define SSH1_CIPHER_RC4   5 /* RC4 */
 
#define SSH1_CIPHER_BLOWFISH   6 /* Blowfish */
 
#define SSH1_CIPHER_CRIPPLED   7 /* Reserved, from ssh 1.2.x source */
 
#define SSH1_AUTH_RHOSTS   1 /* .rhosts or /etc/hosts.equiv */
 
#define SSH1_AUTH_RSA   2 /* RSA challenge-response */
 
#define SSH1_AUTH_PASSWORD   3 /* Password */
 
#define SSH1_AUTH_RHOSTS_RSA   4 /* .rhosts with RSA challenge-response */
 
#define SSH1_AUTH_TIS   5 /* TIS authsrv */
 
#define SSH1_AUTH_KERBEROS   6 /* Kerberos */
 
#define SSH1_PASS_KERBEROS_TGT   7 /* Kerberos TGT-passing */
 
#define SSH_MSG_DISCONNECT   1 /* Disconnect session */
 
#define SSH_MSG_IGNORE   2 /* No-op */
 
#define SSH_MSG_DEBUG   4 /* No-op */
 
#define SSH_MSG_SERVICE_REQUEST   5 /* Request authentiction */
 
#define SSH_MSG_SERVICE_ACCEPT   6 /* Acknowledge request */
 
#define SSH_MSG_KEXINIT   20 /* Hello */
 
#define SSH_MSG_NEWKEYS   21 /* Change cipherspec */
 
#define SSH_MSG_KEXDH_INIT   30 /* DH, phase 1 */
 
#define SSH_MSG_KEXDH_REPLY   31 /* DH, phase 2 */
 
#define SSH_MSG_KEXDH_GEX_REQUEST_OLD   30 /* Ephem.DH key request */
 
#define SSH_MSG_KEXDH_GEX_GROUP   31 /* Ephem.DH key response */
 
#define SSH_MSG_KEXDH_GEX_INIT   32 /* Ephem.DH, phase 1 */
 
#define SSH_MSG_KEXDH_GEX_REPLY   33 /* Ephem.DH, phase 2 */
 
#define SSH_MSG_KEXDH_GEX_REQUEST_NEW   34 /* Ephem.DH key request */
 
#define SSH_MSG_KEX_ECDH_INIT   30 /* ECDH, phase 1 */
 
#define SSH_MSG_KEX_ECDH_REPLY   31 /* ECDH, phase 2 */
 
#define SSH_MSG_USERAUTH_REQUEST   50 /* Request authentication */
 
#define SSH_MSG_USERAUTH_FAILURE   51 /* Authentication failed */
 
#define SSH_MSG_USERAUTH_SUCCESS   52 /* Authentication succeeded */
 
#define SSH_MSG_USERAUTH_BANNER   53 /* No-op */
 
#define SSH_MSG_USERAUTH_INFO_REQUEST   60 /* Generic auth.svr.request */
 
#define SSH_MSG_USERAUTH_INFO_RESPONSE   61 /* Generic auth.cli.response */
 
#define SSH_MSG_GLOBAL_REQUEST   80 /* Perform a global ioctl */
 
#define SSH_MSG_GLOBAL_SUCCESS   81 /* Global request succeeded */
 
#define SSH_MSG_GLOBAL_FAILURE   82 /* Global request failed */
 
#define SSH_MSG_CHANNEL_OPEN   90 /* Open a channel over an SSH link */
 
#define SSH_MSG_CHANNEL_OPEN_CONFIRMATION   91 /* Channel open succeeded */
 
#define SSH_MSG_CHANNEL_OPEN_FAILURE   92 /* Channel open failed */
 
#define SSH_MSG_CHANNEL_WINDOW_ADJUST   93 /* No-op */
 
#define SSH_MSG_CHANNEL_DATA   94 /* Data */
 
#define SSH_MSG_CHANNEL_EXTENDED_DATA   95 /* Out-of-band data */
 
#define SSH_MSG_CHANNEL_EOF   96 /* EOF */
 
#define SSH_MSG_CHANNEL_CLOSE   97 /* Close the channel */
 
#define SSH_MSG_CHANNEL_REQUEST   98 /* Perform a channel ioctl */
 
#define SSH_MSG_CHANNEL_SUCCESS   99 /* Channel request succeeded */
 
#define SSH_MSG_CHANNEL_FAILURE   100/* Channel request failed */
 
#define SSH1_MSG_SPECIAL_USEROPT   500 /* Value to handle SSHv1 user name */
 
#define SSH1_MSG_SPECIAL_PWOPT   501 /* Value to handle SSHv1 password */
 
#define SSH1_MSG_SPECIAL_RSAOPT   502 /* Value to handle SSHv1 RSA challenge */
 
#define SSH1_MSG_SPECIAL_ANY   503 /* Any SSHv1 packet type */
 
#define SSH_MSG_SPECIAL_FIRST   500 /* Boundary for _SPECIAL types */
 
#define SSH_MSG_SPECIAL_USERAUTH   501 /* Value to handle SSHv2 combined auth.*/
 
#define SSH_MSG_SPECIAL_USERAUTH_PAM   502 /* Value to handle SSHv2 PAM auth.*/
 
#define SSH_MSG_SPECIAL_CHANNEL   503 /* Value to handle channel open */
 
#define SSH_MSG_SPECIAL_REQUEST   504 /* Value to handle SSHv2 global/channel req.*/
 
#define SSH_MSG_SPECIAL_LAST   505 /* Last valid _SPECIAL type */
 
#define SSH_DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECT   1
 
#define SSH_DISCONNECT_PROTOCOL_ERROR   2
 
#define SSH_DISCONNECT_KEY_EXCHANGE_FAILED   3
 
#define SSH_DISCONNECT_RESERVED   4
 
#define SSH_DISCONNECT_MAC_ERROR   5
 
#define SSH_DISCONNECT_COMPRESSION_ERROR   6
 
#define SSH_DISCONNECT_SERVICE_NOT_AVAILABLE   7
 
#define SSH_DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED   8
 
#define SSH_DISCONNECT_HOST_KEY_NOT_VERIFIABLE   9
 
#define SSH_DISCONNECT_CONNECTION_LOST   10
 
#define SSH_DISCONNECT_BY_APPLICATION   11
 
#define SSH_DISCONNECT_TOO_MANY_CONNECTIONS   12
 
#define SSH_DISCONNECT_AUTH_CANCELLED_BY_USER   13
 
#define SSH_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE   14
 
#define SSH_DISCONNECT_ILLEGAL_USER_NAME   15
 
#define SSH_OPEN_ADMINISTRATIVELY_PROHIBITED   1
 
#define SSH_OPEN_CONNECT_FAILED   2
 
#define SSH_OPEN_UNKNOWN_CHANNEL_TYPE   3
 
#define SSH_OPEN_RESOURCE_SHORTAGE   4
 
#define CRYPT_PSEUDOALGO_DHE   ( CRYPT_ALGO_LAST_CONVENTIONAL - 9 )
 
#define CRYPT_PSEUDOALGO_DHE_ALT   ( CRYPT_ALGO_LAST_CONVENTIONAL - 8 )
 
#define CRYPT_PSEUDOALGO_ECDH_P384   ( CRYPT_ALGO_LAST_CONVENTIONAL - 7 )
 
#define CRYPT_PSEUDOALGO_ECDH_P521   ( CRYPT_ALGO_LAST_CONVENTIONAL - 6 )
 
#define CRYPT_PSEUDOALGO_ECDSA_P384   ( CRYPT_ALGO_LAST_CONVENTIONAL - 5 )
 
#define CRYPT_PSEUDOALGO_ECDSA_P521   ( CRYPT_ALGO_LAST_CONVENTIONAL - 4 )
 
#define CRYPT_PSEUDOALGO_COPR   ( CRYPT_ALGO_LAST_CONVENTIONAL - 3 )
 
#define CRYPT_PSEUDOALGO_PASSWORD   ( CRYPT_ALGO_LAST_CONVENTIONAL - 2 )
 
#define CRYPT_PSEUDOALGO_PAM   ( CRYPT_ALGO_LAST_CONVENTIONAL - 1 )
 
#define MAX_ENCODED_KEYEXSIZE   ( CRYPT_MAX_PKCSIZE + 16 )
 
#define ENCODED_REQKEYSIZE   ( UINT_SIZE * 3 )
 
#define isPseudoAlgo(algorithm)
 
#define isValidDHsize(value, serverKeySize, extraLength)
 
#define isValidECDHsize(value, serverKeySize, extraLength)
 
#define hostModulus   clientKeyexValue
 
#define serverModulus   serverKeyexValue
 
#define hostModulusLength   clientKeyexValueLength
 
#define serverModulusLength   serverKeyexValueLength
 
#define UNUSED_CHANNEL_NO   CRYPT_ERROR
 
#define UNUSED_CHANNEL_ID   0
 
#define streamBookmarkSet(stream, offset)   offset = stell( stream )
 
#define streamBookmarkSetFullPacket(stream, offset)   offset = stell( stream ) - ID_SIZE
 
#define initSSH1processing   initSSH2processing
 

Typedefs

typedef struct SH SSH_HANDSHAKE_INFO
 

Enumerations

enum  SSH_ATTRIBUTE_TYPE {
  SSH_ATTRIBUTE_NONE, SSH_ATTRIBUTE_ACTIVE, SSH_ATTRIBUTE_WINDOWCOUNT, SSH_ATTRIBUTE_WINDOWSIZE,
  SSH_ATTRIBUTE_ALTCHANNELNO, SSH_ATRIBUTE_LAST
}
 
enum  CHANNEL_TYPE {
  CHANNEL_NONE, CHANNEL_READ, CHANNEL_WRITE, CHANNEL_BOTH,
  CHANNEL_LAST
}
 
enum  MAC_TYPE { MAC_NONE, MAC_START, MAC_END, MAC_LAST }
 

Functions

CHECK_RETVAL STDC_NONNULL_ARG ((1, 2, 3)) int streamBookmarkComplete(INOUT STREAM *stream
 
CHECK_RETVAL int getAlgoStringInfo (OUT const ALGO_STRING_INFO **algoStringInfoPtrPtr, OUT_INT_Z int *noInfoEntries)
 
CHECK_RETVAL STDC_NONNULL_ARG ((1, 2, 4, 6)) int readAlgoString(INOUT STREAM *stream
 
CHECK_RETVAL IN_ARRAY (noAlgoStringEntries) const ALGO_STRING_INFO *algoInfo
 
CHECK_RETVAL IN_RANGE (1, 100) const int noAlgoStringEntries
 
CHECK_RETVAL STDC_NONNULL_ARG ((1)) int writeAlgoString(INOUT STREAM *stream
 
CHECK_RETVAL STDC_NONNULL_ARG ((1, 2)) int processClientAuth(INOUT SESSION_INFO *sessionInfoPtr
 
CHECK_RETVAL STDC_NONNULL_ARG ((1, 4)) int addChannel(INOUT SESSION_INFO *sessionInfoPtr
 
CHECK_RETVAL IN const long IN_LENGTH_MIN (1024) const int maxPacketSize
 
CHECK_RETVAL IN const long IN_BUFFER (typeLen) const void *type
 
CHECK_RETVAL IN const long
IN_LENGTH_SHORT const int 
IN_BUFFER_OPT (arg1Len) const void *arg1
 
CHECK_RETVAL IN const long IN_ENUM (CHANNEL) const CHANNEL_TYPE channelType
 
CHECK_RETVAL IN const long IN_ENUM_OPT (CHANNEL) const CHANNEL_TYPE channelType)
 
 CHECK_RETVAL_RANGE (1, LONG_MAX) STDC_NONNULL_ARG((1)) long getCurrentChannelNo(const SESSION_INFO *sessionInfoPtr
 
 CHECK_RETVAL_ENUM (CHANNEL) STDC_NONNULL_ARG((1)) CHANNEL_TYPE getChannelStatusByChannelNo(const SESSION_INFO *sessionInfoPtr
 
 IN_BUFFER (addrInfoLen) const char *addrInfo
 
CHECK_RETVAL IN_ATTRIBUTE
const CRYPT_ATTRIBUTE_TYPE 
OUT_BUFFER_OPT (dataMaxLength,*dataLength) void *data
 
CHECK_RETVAL IN_ENUM (SSH_ATTRIBUTE) const SSH_ATTRIBUTE_TYPE attribute
 
CHECK_RETVAL STDC_NONNULL_ARG ((1, 3)) int setChannelAttributeS(INOUT SESSION_INFO *sessionInfoPtr
 
CHECK_RETVAL IN_ATTRIBUTE
const CRYPT_ATTRIBUTE_TYPE 
IN_BUFFER (dataLength) const void *data
 
CHECK_RETVAL IN_ATTRIBUTE
const CRYPT_ATTRIBUTE_TYPE 
IN_RANGE (1, CRYPT_MAX_TEXTSIZE) const int dataLength)
 
CHECK_RETVAL IN_RANGE (1, 255) const int type
 
CHECK_RETVAL IN_RANGE (0, 4) const int noParams
 
 CHECK_RETVAL_RANGE (10000, MAX_WINDOW_SIZE) STDC_NONNULL_ARG((1)) int getWindowSize(const SESSION_INFO *sessionInfoPtr)
 
CHECK_RETVAL OUT_LENGTH_SHORT_Z int IN_BUFFER_OPT (keyDataLength) const void *keyData
 
CHECK_RETVAL STDC_NONNULL_ARG ((2)) int hashAsString(IN_HANDLE const CRYPT_CONTEXT iHashContext
 
CHECK_RETVAL STDC_NONNULL_ARG ((3)) int checkMacSSH(IN_HANDLE const CRYPT_CONTEXT iMacContext
 
CHECK_RETVAL IN_INT const long IN_BUFFER (dataMaxLength) const BYTE *data
 
CHECK_RETVAL IN_INT const long
IN_LENGTH const int
IN_LENGTH_Z const int 
IN_RANGE (16, CRYPT_MAX_HASHSIZE) const int macLength)
 
CHECK_RETVAL IN_INT const long
IN_LENGTH const int
IN_LENGTH_Z const int
IN_LENGTH const int 
IN_ENUM (MAC) const MAC_TYPE macType
 
CHECK_RETVAL_PTR const char * getSSHPacketName (IN_RANGE(0, 255) const int packetType)
 
CHECK_RETVAL STDC_NONNULL_ARG ((1, 3, 4)) int readPacketHeaderSSH2(INOUT SESSION_INFO *sessionInfoPtr
 
CHECK_RETVAL IN_RANGE (SSH_MSG_DISCONNECT, SSH_MSG_SPECIAL_REQUEST) const int expectedType
 
CHECK_RETVAL IN_RANGE (1, 1024) const int minPacketSize)
 
CHECK_RETVAL const SESSION_INFO IN_RANGE (SSH_MSG_DISCONNECT, SSH_MSG_CHANNEL_FAILURE) const int packetType)
 
void initSSH1processing (INOUT SESSION_INFO *sessionInfoPtr, INOUT_OPT SSH_HANDSHAKE_INFO *handshakeInfo, const BOOLEAN isServer) STDC_NONNULL_ARG((1))
 

Variables

CHECK_RETVAL OUT_OPT_PTR void ** dataPtrPtr
 
CHECK_RETVAL OUT_OPT_PTR void
OUT_LENGTH_Z int * 
length
 
CHECK_RETVAL OUT_OPT_PTR void
OUT_LENGTH_Z int IN_LENGTH
const int 
position
 
CHECK_RETVAL OUT_ALGO_Z
CRYPT_ALGO_TYPE
algo
 
CHECK_RETVAL OUT_ALGO_Z
CRYPT_ALGO_TYPE const BOOLEAN 
useFirstMatch
 
CHECK_RETVAL OUT_ALGO_Z
CRYPT_ALGO_TYPE const BOOLEAN
INOUT ERROR_INFO
errorInfo
 
CHECK_RETVAL INOUT
SSH_HANDSHAKE_INFO
handshakeInfo
 
CHECK_RETVAL INOUT
SSH_HANDSHAKE_INFO
OUT_LENGTH_SHORT_Z int * 
keyexLength
 
CHECK_RETVAL INOUT
SSH_HANDSHAKE_INFO
OUT_LENGTH_SHORT_Z int const
BOOLEAN 
isServer
 
CHECK_RETVAL const BOOLEAN userInfoPresent
 
CHECK_RETVAL IN const long channelNo
 
CHECK_RETVAL IN const long
IN_LENGTH_SHORT const int 
typeLen
 
CHECK_RETVAL IN const long
IN_LENGTH_SHORT const int
IN_LENGTH_SHORT const int 
arg1Len
 
CHECK_RETVAL IN const long
const BOOLEAN 
deleteLastChannel
 
IN_LENGTH_SHORT const int addrInfoLen
 
CHECK_RETVAL IN_ATTRIBUTE
const CRYPT_ATTRIBUTE_TYPE 
attribute
 
CHECK_RETVAL IN_ATTRIBUTE
const CRYPT_ATTRIBUTE_TYPE
OUT_INT_Z int * 
value
 
CHECK_RETVAL IN_ATTRIBUTE
const CRYPT_ATTRIBUTE_TYPE
IN_LENGTH_SHORT_Z const int 
dataMaxLength
 
CHECK_RETVAL IN_ATTRIBUTE
const CRYPT_ATTRIBUTE_TYPE
IN_LENGTH_SHORT_Z const int
OUT_LENGTH_SHORT_Z int * 
dataLength
 
CHECK_RETVAL IN const long
const int 
param1
 
CHECK_RETVAL IN const long
const int const int 
param2
 
CHECK_RETVAL IN const long
const int const int const int 
param3
 
CHECK_RETVAL IN const long
const int 
param
 
CHECK_RETVAL IN_LENGTH_SHORT_Z
const int 
offset
 
CHECK_RETVAL const BOOLEAN closeAllChannels
 
CHECK_RETVAL INOUT STREAMstream
 
CHECK_RETVAL INOUT STREAM IN
const long 
prevChannelNo
 
CHECK_RETVAL
OUT_LENGTH_SHORT_Z int * 
keySize
 
CHECK_RETVAL
OUT_LENGTH_SHORT_Z int
IN_LENGTH_SHORT_Z const int 
keyDataLength
 
CHECK_RETVAL
OUT_LENGTH_SHORT_Z int
IN_LENGTH_SHORT_Z const int
IN_LENGTH_SHORT_OPT const int 
requestedKeySize
 
CHECK_RETVAL IN_INT const long seqNo
 
CHECK_RETVAL IN_INT const long
IN_LENGTH const int
IN_LENGTH_Z const int
IN_LENGTH const int 
packetDataLength
 
CHECK_RETVAL OUT_LENGTH_Z long * packetLength
 
CHECK_RETVAL OUT_LENGTH_Z long
OUT_LENGTH_Z int * 
packetExtraLength
 
CHECK_RETVAL OUT_LENGTH_Z long
OUT_LENGTH_Z int INOUT
SSH_INFO
sshInfo
 
CHECK_RETVAL OUT_LENGTH_Z long
OUT_LENGTH_Z int INOUT
SSH_INFO INOUT_OPT
READSTATE_INFO
readInfo
 
CHECK_RETVAL const SESSION_INFOsessionInfoPtr
 
CHECK_RETVAL const
SESSION_INFO IN_LENGTH const
int 
bufferSize
 
CHECK_RETVAL OUT_LENGTH_Z int * packetOffset
 
CHECK_RETVAL INOUT STREAM
IN_LENGTH_Z const int const
BOOLEAN 
useQuantisedPadding
 
CHECK_RETVAL INOUT STREAM
IN_LENGTH_Z const int const
BOOLEAN const BOOLEAN 
isWriteableStream
 
CHECK_RETVAL INOUT STREAM
const BOOLEAN 
sendOnly
 

Macro Definition Documentation

#define BOOLEAN_SIZE   1 /* Size of boolean value */

Definition at line 32 of file ssh.h.

#define CRYPT_PSEUDOALGO_COPR   ( CRYPT_ALGO_LAST_CONVENTIONAL - 3 )

Definition at line 292 of file ssh.h.

#define CRYPT_PSEUDOALGO_DHE   ( CRYPT_ALGO_LAST_CONVENTIONAL - 9 )

Definition at line 286 of file ssh.h.

#define CRYPT_PSEUDOALGO_DHE_ALT   ( CRYPT_ALGO_LAST_CONVENTIONAL - 8 )

Definition at line 287 of file ssh.h.

#define CRYPT_PSEUDOALGO_ECDH_P384   ( CRYPT_ALGO_LAST_CONVENTIONAL - 7 )

Definition at line 288 of file ssh.h.

#define CRYPT_PSEUDOALGO_ECDH_P521   ( CRYPT_ALGO_LAST_CONVENTIONAL - 6 )

Definition at line 289 of file ssh.h.

#define CRYPT_PSEUDOALGO_ECDSA_P384   ( CRYPT_ALGO_LAST_CONVENTIONAL - 5 )

Definition at line 290 of file ssh.h.

#define CRYPT_PSEUDOALGO_ECDSA_P521   ( CRYPT_ALGO_LAST_CONVENTIONAL - 4 )

Definition at line 291 of file ssh.h.

#define CRYPT_PSEUDOALGO_PAM   ( CRYPT_ALGO_LAST_CONVENTIONAL - 1 )

Definition at line 294 of file ssh.h.

#define CRYPT_PSEUDOALGO_PASSWORD   ( CRYPT_ALGO_LAST_CONVENTIONAL - 2 )

Definition at line 293 of file ssh.h.

#define DEFAULT_PACKET_SIZE   16384

Definition at line 57 of file ssh.h.

#define ENCODED_REQKEYSIZE   ( UINT_SIZE * 3 )

Definition at line 301 of file ssh.h.

#define EXTRA_PACKET_SIZE   512

Definition at line 56 of file ssh.h.

#define hostModulus   clientKeyexValue

Definition at line 386 of file ssh.h.

#define hostModulusLength   clientKeyexValueLength

Definition at line 388 of file ssh.h.

#define ID_SIZE   1 /* ID byte */

Definition at line 28 of file ssh.h.

#define initSSH1processing   initSSH2processing

Definition at line 734 of file ssh.h.

#define isPseudoAlgo (   algorithm)
Value:

Definition at line 306 of file ssh.h.

#define isValidDHsize (   value,
  serverKeySize,
  extraLength 
)
Value:
( ( value ) > ( ( serverKeySize ) - 8 ) + ( extraLength ) && \
( value ) < ( ( serverKeySize ) + 2 ) + ( extraLength ) )

Definition at line 328 of file ssh.h.

#define isValidECDHsize (   value,
  serverKeySize,
  extraLength 
)
Value:
( ( value ) / 2 > ( ( serverKeySize ) - 8 ) + ( extraLength ) && \
( value ) / 2 < ( ( serverKeySize ) + 2 ) + ( extraLength ) )

Definition at line 331 of file ssh.h.

#define LENGTH_SIZE   4 /* Size of packet length field */

Definition at line 29 of file ssh.h.

#define MAX_ENCODED_KEYEXSIZE   ( CRYPT_MAX_PKCSIZE + 16 )

Definition at line 300 of file ssh.h.

#define MAX_PACKET_SIZE   262144L

Definition at line 55 of file ssh.h.

#define MAX_WINDOW_SIZE   ( MAX_INTLENGTH - 8192 )

Definition at line 58 of file ssh.h.

#define MIN_PACKET_SIZE   16

Definition at line 106 of file ssh.h.

#define PADLENGTH_SIZE   1 /* Size of padding length field */

Definition at line 31 of file ssh.h.

#define serverModulus   serverKeyexValue

Definition at line 387 of file ssh.h.

#define serverModulusLength   serverKeyexValueLength

Definition at line 389 of file ssh.h.

#define SSH1_AUTH_KERBEROS   6 /* Kerberos */

Definition at line 171 of file ssh.h.

#define SSH1_AUTH_PASSWORD   3 /* Password */

Definition at line 168 of file ssh.h.

#define SSH1_AUTH_RHOSTS   1 /* .rhosts or /etc/hosts.equiv */

Definition at line 166 of file ssh.h.

#define SSH1_AUTH_RHOSTS_RSA   4 /* .rhosts with RSA challenge-response */

Definition at line 169 of file ssh.h.

#define SSH1_AUTH_RSA   2 /* RSA challenge-response */

Definition at line 167 of file ssh.h.

#define SSH1_AUTH_TIS   5 /* TIS authsrv */

Definition at line 170 of file ssh.h.

#define SSH1_CHALLENGE_SIZE   32 /* Size of SSHv1 RSA auth.challenge */

Definition at line 40 of file ssh.h.

#define SSH1_CIPHER_3DES   3 /* 3DES/inner-CBC (nonstandard) */

Definition at line 158 of file ssh.h.

#define SSH1_CIPHER_BLOWFISH   6 /* Blowfish */

Definition at line 161 of file ssh.h.

#define SSH1_CIPHER_CRIPPLED   7 /* Reserved, from ssh 1.2.x source */

Definition at line 162 of file ssh.h.

#define SSH1_CIPHER_DES   2 /* DES/CBC */

Definition at line 157 of file ssh.h.

#define SSH1_CIPHER_IDEA   1 /* IDEA/CFB */

Definition at line 156 of file ssh.h.

#define SSH1_CIPHER_NONE   0 /* No encryption */

Definition at line 155 of file ssh.h.

#define SSH1_CIPHER_RC4   5 /* RC4 */

Definition at line 160 of file ssh.h.

#define SSH1_CIPHER_TSS   4 /* Deprecated */

Definition at line 159 of file ssh.h.

#define SSH1_CMSG_AGENT_REQUEST_FORWARDING   30

Definition at line 149 of file ssh.h.

#define SSH1_CMSG_AUTH_PASSWORD   9 /* Password */

Definition at line 130 of file ssh.h.

#define SSH1_CMSG_AUTH_RSA   6 /* RSA public key */

Definition at line 127 of file ssh.h.

#define SSH1_CMSG_AUTH_RSA_RESPONSE   8 /* RSA response from client */

Definition at line 129 of file ssh.h.

#define SSH1_CMSG_EXEC_CMD   13 /* Request command execution */

Definition at line 134 of file ssh.h.

#define SSH1_CMSG_EXEC_SHELL   12 /* Request a shell */

Definition at line 133 of file ssh.h.

#define SSH1_CMSG_EXIT_CONFIRMATION   33 /* Client response to server exitstatus */

Definition at line 141 of file ssh.h.

#define SSH1_CMSG_MAX_PACKET_SIZE   38 /* Maximum data packet size */

Definition at line 143 of file ssh.h.

#define SSH1_CMSG_PORT_FORWARD_REQUEST   28

Definition at line 148 of file ssh.h.

#define SSH1_CMSG_REQUEST_COMPRESSION   37

Definition at line 151 of file ssh.h.

#define SSH1_CMSG_REQUEST_PTY   10 /* Request a pty */

Definition at line 131 of file ssh.h.

#define SSH1_CMSG_SESSION_KEY   3 /* Encrypted session key */

Definition at line 125 of file ssh.h.

#define SSH1_CMSG_STDIN_DATA   16 /* Data from client stdin */

Definition at line 137 of file ssh.h.

#define SSH1_CMSG_USER   4 /* User name */

Definition at line 126 of file ssh.h.

#define SSH1_CMSG_WINDOW_SIZE   11 /* Terminal window size change */

Definition at line 132 of file ssh.h.

#define SSH1_CMSG_X11_REQUEST_FORWARDING   34

Definition at line 150 of file ssh.h.

#define SSH1_COOKIE_SIZE   8 /* Size of SSHv1 cookie */

Definition at line 34 of file ssh.h.

#define SSH1_CRC_SIZE   4 /* Size of CRC value */

Definition at line 36 of file ssh.h.

#define SSH1_HEADER_SIZE   5 /* Size of SSHv1 packet header */

Definition at line 35 of file ssh.h.

#define SSH1_ID_STRING   "SSH-1.5-cryptlib"

Definition at line 117 of file ssh.h.

#define SSH1_MAX_HEADER_SIZE   ( LENGTH_SIZE + 8 + ID_SIZE + LENGTH_SIZE )

Definition at line 109 of file ssh.h.

#define SSH1_MPI_LENGTH_SIZE   2 /* Size of MPI length field */

Definition at line 37 of file ssh.h.

#define SSH1_MSG_DEBUG   36 /* Debugging/informational message */

Definition at line 142 of file ssh.h.

#define SSH1_MSG_DISCONNECT   1 /* Disconnect session */

Definition at line 123 of file ssh.h.

#define SSH1_MSG_IGNORE   32 /* No-op */

Definition at line 140 of file ssh.h.

#define SSH1_MSG_SPECIAL_ANY   503 /* Any SSHv1 packet type */

Definition at line 231 of file ssh.h.

#define SSH1_MSG_SPECIAL_PWOPT   501 /* Value to handle SSHv1 password */

Definition at line 229 of file ssh.h.

#define SSH1_MSG_SPECIAL_RSAOPT   502 /* Value to handle SSHv1 RSA challenge */

Definition at line 230 of file ssh.h.

#define SSH1_MSG_SPECIAL_USEROPT   500 /* Value to handle SSHv1 user name */

Definition at line 228 of file ssh.h.

#define SSH1_PASS_KERBEROS_TGT   7 /* Kerberos TGT-passing */

Definition at line 172 of file ssh.h.

#define SSH1_RESPONSE_SIZE   16 /* Size of SSHv1 RSA auth.response */

Definition at line 41 of file ssh.h.

#define SSH1_SECRET_SIZE   32 /* Size of SSHv1 shared secret */

Definition at line 39 of file ssh.h.

#define SSH1_SESSIONID_SIZE   16 /* Size of SSHv1 session ID */

Definition at line 38 of file ssh.h.

#define SSH1_SMSG_AUTH_RSA_CHALLENGE   7 /* RSA challenge from server */

Definition at line 128 of file ssh.h.

#define SSH1_SMSG_EXITSTATUS   20 /* Exit status of command run on server */

Definition at line 139 of file ssh.h.

#define SSH1_SMSG_FAILURE   15 /* Failure status message */

Definition at line 136 of file ssh.h.

#define SSH1_SMSG_PUBLIC_KEY   2 /* Server public key */

Definition at line 124 of file ssh.h.

#define SSH1_SMSG_STDOUT_DATA   17 /* Data from server stdout */

Definition at line 138 of file ssh.h.

#define SSH1_SMSG_SUCCESS   14 /* Success status message */

Definition at line 135 of file ssh.h.

#define SSH2_COOKIE_SIZE   16 /* Size of SSHv2 cookie */

Definition at line 43 of file ssh.h.

#define SSH2_DEFAULT_KEYSIZE   128 /* Size of SSHv2 default DH key */

Definition at line 49 of file ssh.h.

#define SSH2_FIXED_KEY_SIZE   16 /* Size of SSHv2 fixed-size keys */

Definition at line 48 of file ssh.h.

#define SSH2_HEADER_REMAINDER_SIZE   ( MIN_PACKET_SIZE - LENGTH_SIZE )

Definition at line 107 of file ssh.h.

#define SSH2_HEADER_SIZE   5 /* Size of SSHv2 packet header */

Definition at line 44 of file ssh.h.

#define SSH2_ID_STRING   "SSH-2.0-cryptlib" /* cryptlib SSH ID strings */

Definition at line 118 of file ssh.h.

#define SSH2_MIN_ALGOID_SIZE   4 /* Size of shortest SSHv2 algo.name */

Definition at line 45 of file ssh.h.

#define SSH2_MIN_PADLENGTH_SIZE   4 /* Minimum amount of padding for packets */

Definition at line 46 of file ssh.h.

#define SSH2_PAYLOAD_HEADER_SIZE   9 /* Size of SSHv2 inner payload header */

Definition at line 47 of file ssh.h.

#define SSH_DISCONNECT_AUTH_CANCELLED_BY_USER   13

Definition at line 254 of file ssh.h.

#define SSH_DISCONNECT_BY_APPLICATION   11

Definition at line 252 of file ssh.h.

#define SSH_DISCONNECT_COMPRESSION_ERROR   6

Definition at line 247 of file ssh.h.

#define SSH_DISCONNECT_CONNECTION_LOST   10

Definition at line 251 of file ssh.h.

#define SSH_DISCONNECT_HOST_KEY_NOT_VERIFIABLE   9

Definition at line 250 of file ssh.h.

#define SSH_DISCONNECT_HOST_NOT_ALLOWED_TO_CONNECT   1

Definition at line 242 of file ssh.h.

#define SSH_DISCONNECT_ILLEGAL_USER_NAME   15

Definition at line 256 of file ssh.h.

#define SSH_DISCONNECT_KEY_EXCHANGE_FAILED   3

Definition at line 244 of file ssh.h.

#define SSH_DISCONNECT_MAC_ERROR   5

Definition at line 246 of file ssh.h.

#define SSH_DISCONNECT_NO_MORE_AUTH_METHODS_AVAILABLE   14

Definition at line 255 of file ssh.h.

#define SSH_DISCONNECT_PROTOCOL_ERROR   2

Definition at line 243 of file ssh.h.

#define SSH_DISCONNECT_PROTOCOL_VERSION_NOT_SUPPORTED   8

Definition at line 249 of file ssh.h.

#define SSH_DISCONNECT_RESERVED   4

Definition at line 245 of file ssh.h.

#define SSH_DISCONNECT_SERVICE_NOT_AVAILABLE   7

Definition at line 248 of file ssh.h.

#define SSH_DISCONNECT_TOO_MANY_CONNECTIONS   12

Definition at line 253 of file ssh.h.

#define SSH_ID   "SSH-" /* Start of SSH ID */

Definition at line 113 of file ssh.h.

#define SSH_ID_MAX_SIZE   255 /* Max.size of SSHv2 ID string */

Definition at line 116 of file ssh.h.

#define SSH_ID_SIZE   4 /* Size of SSH ID */

Definition at line 114 of file ssh.h.

#define SSH_ID_STRING_SIZE   16 /* Size of ID strings */

Definition at line 119 of file ssh.h.

#define SSH_MSG_CHANNEL_CLOSE   97 /* Close the channel */

Definition at line 211 of file ssh.h.

#define SSH_MSG_CHANNEL_DATA   94 /* Data */

Definition at line 208 of file ssh.h.

#define SSH_MSG_CHANNEL_EOF   96 /* EOF */

Definition at line 210 of file ssh.h.

#define SSH_MSG_CHANNEL_EXTENDED_DATA   95 /* Out-of-band data */

Definition at line 209 of file ssh.h.

#define SSH_MSG_CHANNEL_FAILURE   100/* Channel request failed */

Definition at line 214 of file ssh.h.

#define SSH_MSG_CHANNEL_OPEN   90 /* Open a channel over an SSH link */

Definition at line 204 of file ssh.h.

#define SSH_MSG_CHANNEL_OPEN_CONFIRMATION   91 /* Channel open succeeded */

Definition at line 205 of file ssh.h.

#define SSH_MSG_CHANNEL_OPEN_FAILURE   92 /* Channel open failed */

Definition at line 206 of file ssh.h.

#define SSH_MSG_CHANNEL_REQUEST   98 /* Perform a channel ioctl */

Definition at line 212 of file ssh.h.

#define SSH_MSG_CHANNEL_SUCCESS   99 /* Channel request succeeded */

Definition at line 213 of file ssh.h.

#define SSH_MSG_CHANNEL_WINDOW_ADJUST   93 /* No-op */

Definition at line 207 of file ssh.h.

#define SSH_MSG_DEBUG   4 /* No-op */

Definition at line 181 of file ssh.h.

#define SSH_MSG_DISCONNECT   1 /* Disconnect session */

Definition at line 179 of file ssh.h.

#define SSH_MSG_GLOBAL_FAILURE   82 /* Global request failed */

Definition at line 203 of file ssh.h.

#define SSH_MSG_GLOBAL_REQUEST   80 /* Perform a global ioctl */

Definition at line 201 of file ssh.h.

#define SSH_MSG_GLOBAL_SUCCESS   81 /* Global request succeeded */

Definition at line 202 of file ssh.h.

#define SSH_MSG_IGNORE   2 /* No-op */

Definition at line 180 of file ssh.h.

#define SSH_MSG_KEX_ECDH_INIT   30 /* ECDH, phase 1 */

Definition at line 193 of file ssh.h.

#define SSH_MSG_KEX_ECDH_REPLY   31 /* ECDH, phase 2 */

Definition at line 194 of file ssh.h.

#define SSH_MSG_KEXDH_GEX_GROUP   31 /* Ephem.DH key response */

Definition at line 189 of file ssh.h.

#define SSH_MSG_KEXDH_GEX_INIT   32 /* Ephem.DH, phase 1 */

Definition at line 190 of file ssh.h.

#define SSH_MSG_KEXDH_GEX_REPLY   33 /* Ephem.DH, phase 2 */

Definition at line 191 of file ssh.h.

#define SSH_MSG_KEXDH_GEX_REQUEST_NEW   34 /* Ephem.DH key request */

Definition at line 192 of file ssh.h.

#define SSH_MSG_KEXDH_GEX_REQUEST_OLD   30 /* Ephem.DH key request */

Definition at line 188 of file ssh.h.

#define SSH_MSG_KEXDH_INIT   30 /* DH, phase 1 */

Definition at line 186 of file ssh.h.

#define SSH_MSG_KEXDH_REPLY   31 /* DH, phase 2 */

Definition at line 187 of file ssh.h.

#define SSH_MSG_KEXINIT   20 /* Hello */

Definition at line 184 of file ssh.h.

#define SSH_MSG_NEWKEYS   21 /* Change cipherspec */

Definition at line 185 of file ssh.h.

#define SSH_MSG_SERVICE_ACCEPT   6 /* Acknowledge request */

Definition at line 183 of file ssh.h.

#define SSH_MSG_SERVICE_REQUEST   5 /* Request authentiction */

Definition at line 182 of file ssh.h.

#define SSH_MSG_SPECIAL_CHANNEL   503 /* Value to handle channel open */

Definition at line 236 of file ssh.h.

#define SSH_MSG_SPECIAL_FIRST   500 /* Boundary for _SPECIAL types */

Definition at line 233 of file ssh.h.

#define SSH_MSG_SPECIAL_LAST   505 /* Last valid _SPECIAL type */

Definition at line 238 of file ssh.h.

#define SSH_MSG_SPECIAL_REQUEST   504 /* Value to handle SSHv2 global/channel req.*/

Definition at line 237 of file ssh.h.

#define SSH_MSG_SPECIAL_USERAUTH   501 /* Value to handle SSHv2 combined auth.*/

Definition at line 234 of file ssh.h.

#define SSH_MSG_SPECIAL_USERAUTH_PAM   502 /* Value to handle SSHv2 PAM auth.*/

Definition at line 235 of file ssh.h.

#define SSH_MSG_USERAUTH_BANNER   53 /* No-op */

Definition at line 198 of file ssh.h.

#define SSH_MSG_USERAUTH_FAILURE   51 /* Authentication failed */

Definition at line 196 of file ssh.h.

#define SSH_MSG_USERAUTH_INFO_REQUEST   60 /* Generic auth.svr.request */

Definition at line 199 of file ssh.h.

#define SSH_MSG_USERAUTH_INFO_RESPONSE   61 /* Generic auth.cli.response */

Definition at line 200 of file ssh.h.

#define SSH_MSG_USERAUTH_REQUEST   50 /* Request authentication */

Definition at line 195 of file ssh.h.

#define SSH_MSG_USERAUTH_SUCCESS   52 /* Authentication succeeded */

Definition at line 197 of file ssh.h.

#define SSH_OPEN_ADMINISTRATIVELY_PROHIBITED   1

Definition at line 260 of file ssh.h.

#define SSH_OPEN_CONNECT_FAILED   2

Definition at line 261 of file ssh.h.

#define SSH_OPEN_RESOURCE_SHORTAGE   4

Definition at line 263 of file ssh.h.

#define SSH_OPEN_UNKNOWN_CHANNEL_TYPE   3

Definition at line 262 of file ssh.h.

#define SSH_PFLAG_ASYMMCOPR   0x0800/* Peer sends asymmetric compression algos */

Definition at line 91 of file ssh.h.

#define SSH_PFLAG_CUTEFTP   0x2000/* CuteFTP, drops conn.during handshake */

Definition at line 93 of file ssh.h.

#define SSH_PFLAG_DUMMYUSERAUTH   0x0100/* Peer requires dummy userAuth message */

Definition at line 88 of file ssh.h.

#define SSH_PFLAG_EMPTYSVCACCEPT   0x1000/* Peer sends empty SSH_SERVICE_ACCEPT */

Definition at line 92 of file ssh.h.

#define SSH_PFLAG_EMPTYUSERAUTH   0x0200/* Peer sends empty userauth-failure response */

Definition at line 89 of file ssh.h.

#define SSH_PFLAG_HMACKEYSIZE   0x0001/* Peer uses short HMAC keys */

Definition at line 80 of file ssh.h.

#define SSH_PFLAG_MAX   0x3FFF/* Maximum possible flag value */

Definition at line 94 of file ssh.h.

#define SSH_PFLAG_NOHASHLENGTH   0x0008/* Peer omits length in exchange hash */

Definition at line 83 of file ssh.h.

#define SSH_PFLAG_NOHASHSECRET   0x0004/* Peer omits secret in key derive */

Definition at line 82 of file ssh.h.

#define SSH_PFLAG_NONE   0x0000/* No protocol-specific flags */

Definition at line 79 of file ssh.h.

#define SSH_PFLAG_PAMPW   0x0080/* Peer chokes on "password" as PAM submethod */

Definition at line 87 of file ssh.h.

#define SSH_PFLAG_RSASIGPAD   0x0010/* Peer requires zero-padded RSA sig.*/

Definition at line 84 of file ssh.h.

#define SSH_PFLAG_SIGFORMAT   0x0002/* Peer omits signature algo name */

Definition at line 81 of file ssh.h.

#define SSH_PFLAG_TEXTDIAGS   0x0040/* Peer dumps text diagnostics on error */

Definition at line 86 of file ssh.h.

#define SSH_PFLAG_WINDOWSIZE   0x0020/* Peer mishandles large window sizes */

Definition at line 85 of file ssh.h.

#define SSH_PFLAG_ZEROLENIGNORE   0x0400/* Peer sends zero-length SSH_IGNORE */

Definition at line 90 of file ssh.h.

#define SSH_PORT   22

Definition at line 24 of file ssh.h.

#define SSH_VERSION_SIZE   4 /* Size of SSH version */

Definition at line 115 of file ssh.h.

#define streamBookmarkSet (   stream,
  offset 
)    offset = stell( stream )

Definition at line 456 of file ssh.h.

#define streamBookmarkSetFullPacket (   stream,
  offset 
)    offset = stell( stream ) - ID_SIZE

Definition at line 458 of file ssh.h.

#define UINT_SIZE   4 /* Size of integer value */

Definition at line 30 of file ssh.h.

#define UNUSED_CHANNEL_ID   0

Definition at line 437 of file ssh.h.

#define UNUSED_CHANNEL_NO   CRYPT_ERROR

Definition at line 436 of file ssh.h.

Typedef Documentation

typedef struct SH SSH_HANDSHAKE_INFO

Enumeration Type Documentation

Enumerator:
CHANNEL_NONE 
CHANNEL_READ 
CHANNEL_WRITE 
CHANNEL_BOTH 
CHANNEL_LAST 

Definition at line 499 of file ssh.h.

enum MAC_TYPE
Enumerator:
MAC_NONE 
MAC_START 
MAC_END 
MAC_LAST 

Definition at line 605 of file ssh.h.

Enumerator:
SSH_ATTRIBUTE_NONE 
SSH_ATTRIBUTE_ACTIVE 
SSH_ATTRIBUTE_WINDOWCOUNT 
SSH_ATTRIBUTE_WINDOWSIZE 
SSH_ATTRIBUTE_ALTCHANNELNO 
SSH_ATRIBUTE_LAST 

Definition at line 314 of file ssh.h.

Function Documentation

CHECK_RETVAL_ENUM ( CHANNEL  ) const
CHECK_RETVAL_RANGE ( ,
LONG_MAX   
) const
CHECK_RETVAL_RANGE ( 10000  ,
MAX_WINDOW_SIZE   
) const
CHECK_RETVAL int getAlgoStringInfo ( OUT const ALGO_STRING_INFO **  algoStringInfoPtrPtr,
OUT_INT_Z int *  noInfoEntries 
)
CHECK_RETVAL_PTR const char* getSSHPacketName ( IN_RANGE(0, 255) const int  packetType)
CHECK_RETVAL IN_ARRAY ( noAlgoStringEntries  ) const
CHECK_RETVAL IN const long IN_BUFFER ( typeLen  ) const
IN_BUFFER ( addrInfoLen  ) const
CHECK_RETVAL IN_INT const long IN_BUFFER ( dataMaxLength  ) const
CHECK_RETVAL IN const long IN_LENGTH_SHORT const int IN_BUFFER_OPT ( arg1Len  ) const
CHECK_RETVAL OUT_LENGTH_SHORT_Z int IN_BUFFER_OPT ( keyDataLength  ) const
CHECK_RETVAL IN const long IN_ENUM ( CHANNEL  ) const
CHECK_RETVAL IN_ENUM ( SSH_ATTRIBUTE  ) const
CHECK_RETVAL IN_INT const long IN_LENGTH const int IN_LENGTH_Z const int IN_LENGTH const int IN_ENUM ( MAC  ) const
CHECK_RETVAL IN const long IN_ENUM_OPT ( CHANNEL  ) const
CHECK_RETVAL IN const long IN_LENGTH_MIN ( 1024  ) const
CHECK_RETVAL IN_RANGE ( ,
100   
) const
CHECK_RETVAL IN_RANGE ( ,
255   
) const
CHECK_RETVAL IN_RANGE ( ,
 
) const
CHECK_RETVAL IN_INT const long IN_LENGTH const int IN_LENGTH_Z const int IN_LENGTH const int IN_RANGE ( 16  ,
CRYPT_MAX_HASHSIZE   
) const
CHECK_RETVAL IN_RANGE ( ,
1024   
) const
void initSSH1processing ( INOUT SESSION_INFO sessionInfoPtr,
INOUT_OPT SSH_HANDSHAKE_INFO handshakeInfo,
const BOOLEAN  isServer 
)
CHECK_RETVAL IN_ATTRIBUTE const CRYPT_ATTRIBUTE_TYPE OUT_BUFFER_OPT ( dataMaxLength  ,
dataLength 
)
CHECK_RETVAL STDC_NONNULL_ARG ( (1, 2, 3)  )
CHECK_RETVAL STDC_NONNULL_ARG ( (1, 2, 4, 6)  )
CHECK_RETVAL STDC_NONNULL_ARG ( (1)  )

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Definition at line 26 of file ctx_attr.c.

CHECK_RETVAL STDC_NONNULL_ARG ( (1, 2)  )
CHECK_RETVAL STDC_NONNULL_ARG ( (1, 4)  )
CHECK_RETVAL STDC_NONNULL_ARG ( (1, 3)  )
CHECK_RETVAL STDC_NONNULL_ARG ( (2)  ) const
CHECK_RETVAL STDC_NONNULL_ARG ( (3)  ) const
CHECK_RETVAL STDC_NONNULL_ARG ( (1, 3, 4)  )

Variable Documentation

IN_LENGTH_SHORT const int addrInfoLen

Definition at line 530 of file ssh.h.

Definition at line 476 of file ssh.h.

Definition at line 511 of file ssh.h.

Definition at line 533 of file ssh.h.

Definition at line 694 of file ssh.h.

CHECK_RETVAL IN const long channelNo

Definition at line 506 of file ssh.h.

CHECK_RETVAL const BOOLEAN closeAllChannels

Definition at line 583 of file ssh.h.

Definition at line 540 of file ssh.h.

CHECK_RETVAL IN_INT const long IN_LENGTH const int dataMaxLength

Definition at line 540 of file ssh.h.

CHECK_RETVAL OUT_OPT_PTR void** dataPtrPtr

Definition at line 462 of file ssh.h.

CHECK_RETVAL IN const long const BOOLEAN deleteLastChannel

Definition at line 516 of file ssh.h.

Definition at line 476 of file ssh.h.

Definition at line 484 of file ssh.h.

Definition at line 484 of file ssh.h.

Definition at line 707 of file ssh.h.

Definition at line 618 of file ssh.h.

Definition at line 484 of file ssh.h.

Definition at line 616 of file ssh.h.

Definition at line 462 of file ssh.h.

Definition at line 575 of file ssh.h.

Definition at line 649 of file ssh.h.

CHECK_RETVAL OUT_LENGTH_Z long OUT_LENGTH_Z int* packetExtraLength

Definition at line 670 of file ssh.h.

Definition at line 670 of file ssh.h.

CHECK_RETVAL OUT_LENGTH_SHORT_Z int * packetOffset

Definition at line 704 of file ssh.h.

CHECK_RETVAL IN const long const int param

Definition at line 571 of file ssh.h.

CHECK_RETVAL IN const long const int param1

Definition at line 564 of file ssh.h.

CHECK_RETVAL IN const long const int const int param2

Definition at line 564 of file ssh.h.

CHECK_RETVAL IN const long const int const int const int param3

Definition at line 564 of file ssh.h.

Definition at line 462 of file ssh.h.

CHECK_RETVAL INOUT STREAM IN const long prevChannelNo

Definition at line 600 of file ssh.h.

Definition at line 670 of file ssh.h.

Definition at line 618 of file ssh.h.

Definition at line 713 of file ssh.h.

Definition at line 640 of file ssh.h.

Definition at line 688 of file ssh.h.

Definition at line 670 of file ssh.h.

Definition at line 586 of file ssh.h.

Definition at line 509 of file ssh.h.

Definition at line 476 of file ssh.h.

Definition at line 707 of file ssh.h.

CHECK_RETVAL const BOOLEAN userInfoPresent

Definition at line 495 of file ssh.h.

Definition at line 533 of file ssh.h.