Skip to content

Commit

Permalink
libssh2 1.2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
x2on committed Apr 10, 2011
1 parent b3289d0 commit e603feb
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Classes/libssh2_for_iOSAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ - (IBAction)executeCommand:(id)sender {


- (IBAction)showInfo {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"libssh2-for-iOS" message:@"libssh2-Version: 1.2.7\nlibgcrypt-Version: 1.4.6\nlibgpg-error-Version: 1.10\nopenssl-Version: 1.0.0c\n\nLicense: See include/*/LICENSE\n\nCopyright 2011 by Felix Schulze\n http://www.x2on.de" delegate:nil cancelButtonTitle:@"Close" otherButtonTitles:nil];
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"libssh2-for-iOS" message:@"libssh2-Version: 1.2.8\nlibgcrypt-Version: 1.4.6\nlibgpg-error-Version: 1.10\nopenssl-Version: 1.0.0c\n\nLicense: See include/*/LICENSE\n\nCopyright 2011 by Felix Schulze\n http://www.x2on.de" delegate:nil cancelButtonTitle:@"Close" otherButtonTitles:nil];
[alert show];
[alert release];
}
Expand Down
2 changes: 1 addition & 1 deletion build-libgcrypt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# Change values here
#
VERSION="1.4.6"
SDKVERSION="4.2"
SDKVERSION="4.3"
#
###########################################################################
#
Expand Down
2 changes: 1 addition & 1 deletion build-libgpg-error.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# Change values here
#
VERSION="1.10"
SDKVERSION="4.2"
SDKVERSION="4.3"
#
###########################################################################
#
Expand Down
4 changes: 2 additions & 2 deletions build-libssh2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
###########################################################################
# Change values here
#
VERSION="1.2.7"
SDKVERSION="4.2"
VERSION="1.2.8"
SDKVERSION="4.3"
#
###########################################################################
#
Expand Down
2 changes: 1 addition & 1 deletion build-libssl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# Change values here #
# #
VERSION="1.0.0d" #
SDKVERSION="4.2" #
SDKVERSION="4.3" #
# #
###########################################################################
# #
Expand Down
65 changes: 52 additions & 13 deletions include/libssh2/libssh2.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Copyright (c) 2004-2009, Sara Golemon <sarag@libssh2.org>
* Copyright (c) 2009 by Daniel Stenberg
* Copyright (c) 2009-2010 Daniel Stenberg
* Copyright (c) 2010 Simon Josefsson <simon@josefsson.org>
* All rights reserved.
*
Expand Down Expand Up @@ -46,13 +46,13 @@
to make the BANNER define (used by src/session.c) be a valid SSH
banner. Release versions have no appended strings and may of course not
have dashes either. */
#define LIBSSH2_VERSION "1.2.7"
#define LIBSSH2_VERSION "1.2.8"

/* The numeric version number is also available "in parts" by using these
defines: */
#define LIBSSH2_VERSION_MAJOR 1
#define LIBSSH2_VERSION_MINOR 2
#define LIBSSH2_VERSION_PATCH 7
#define LIBSSH2_VERSION_PATCH 8

/* This is the numeric version of the libssh2 version number, meant for easier
parsing and comparions by programs. The LIBSSH2_VERSION_NUM define will
Expand All @@ -69,7 +69,7 @@
and it is always a greater number in a more recent release. It makes
comparisons with greater than and less than work.
*/
#define LIBSSH2_VERSION_NUM 0x010207
#define LIBSSH2_VERSION_NUM 0x010208

/*
* This is the date and time when the full source package was created. The
Expand All @@ -80,13 +80,17 @@
*
* "Mon Feb 12 11:35:33 UTC 2007"
*/
#define LIBSSH2_TIMESTAMP "Tue Aug 17 21:11:33 UTC 2010"
#define LIBSSH2_TIMESTAMP "Tue Apr 5 17:15:42 UTC 2011"

#ifndef LIBSSH2_VERSION_ONLY

#ifdef __cplusplus
extern "C" {
#endif
#ifdef _MSC_VER
# include <BaseTsd.h>
# include <WinSock2.h>
#endif

#include <stddef.h>
#include <string.h>
Expand All @@ -106,8 +110,7 @@ extern "C" {
# endif /* LIBSSH2_WIN32 */
#endif /* LIBSSH2_API */

#if defined(LIBSSH2_DARWIN) || (defined(LIBSSH2_WIN32) && \
!defined(_MSC_VER) && !defined(__MINGW32__))
#if defined(LIBSSH2_DARWIN)
# include <sys/uio.h>
#endif

Expand All @@ -122,15 +125,21 @@ typedef unsigned char uint8_t;
typedef unsigned int uint32_t;
typedef unsigned __int64 libssh2_uint64_t;
typedef __int64 libssh2_int64_t;
# ifndef _SSIZE_T_DEFINED
typedef int ssize_t;
# define _SSIZE_T_DEFINED
#ifndef ssize_t
typedef SSIZE_T ssize_t;
#endif
#else
typedef unsigned long long libssh2_uint64_t;
typedef long long libssh2_int64_t;
#endif

#ifdef WIN32
typedef SOCKET libssh2_socket_t;
#else /* !WIN32 */
typedef int libssh2_socket_t;
#define INVALID_SOCKET -1
#endif /* WIN32 */

/* Part of every banner, user specified or not */
#define LIBSSH2_SSH_BANNER "SSH-2.0-libssh2_" LIBSSH2_VERSION

Expand Down Expand Up @@ -247,8 +256,9 @@ typedef struct _LIBSSH2_USERAUTH_KBDINT_RESPONSE
#define LIBSSH2_METHOD_LANG_CS 8
#define LIBSSH2_METHOD_LANG_SC 9

/* session.flags bits */
#define LIBSSH2_FLAG_SIGPIPE 0x00000001
/* flags */
#define LIBSSH2_FLAG_SIGPIPE 1
#define LIBSSH2_FLAG_COMPRESS 2

typedef struct _LIBSSH2_SESSION LIBSSH2_SESSION;
typedef struct _LIBSSH2_CHANNEL LIBSSH2_CHANNEL;
Expand Down Expand Up @@ -331,8 +341,15 @@ typedef struct _LIBSSH2_POLLFD {

/* Error Codes (defined by libssh2) */
#define LIBSSH2_ERROR_NONE 0

/* The library once used -1 as a generic error return value on numerous places
through the code, which subsequently was converted to
LIBSSH2_ERROR_SOCKET_NONE uses over time. As this is a generic error code,
the goal is to never ever return this code but instead make sure that a
more accurate and descriptive error code is used. */
#define LIBSSH2_ERROR_SOCKET_NONE -1
#define LIBSSH2_ERROR_BANNER_NONE -2

#define LIBSSH2_ERROR_BANNER_RECV -2
#define LIBSSH2_ERROR_BANNER_SEND -3
#define LIBSSH2_ERROR_INVALID_MAC -4
#define LIBSSH2_ERROR_KEX_FAILURE -5
Expand Down Expand Up @@ -374,6 +391,12 @@ typedef struct _LIBSSH2_POLLFD {
#define LIBSSH2_ERROR_COMPRESS -40
#define LIBSSH2_ERROR_OUT_OF_BOUNDARY -41
#define LIBSSH2_ERROR_AGENT_PROTOCOL -42
#define LIBSSH2_ERROR_SOCKET_RECV -43
#define LIBSSH2_ERROR_ENCRYPT -44
#define LIBSSH2_ERROR_BAD_SOCKET -45

/* this is a define to provide the old (<= 1.2.7) name */
#define LIBSSH2_ERROR_BANNER_NONE LIBSSH2_ERROR_BANNER_RECV

/* Global API */
#define LIBSSH2_INIT_NO_CRYPTO 0x0001
Expand Down Expand Up @@ -401,6 +424,13 @@ LIBSSH2_API int libssh2_init(int flags);
*/
LIBSSH2_API void libssh2_exit(void);

/*
* libssh2_free()
*
* Deallocate memory allocated by earlier call to libssh2 functions.
*/
LIBSSH2_API void libssh2_free(LIBSSH2_SESSION *session, void *ptr);

/* Session API */
LIBSSH2_API LIBSSH2_SESSION *
libssh2_session_init_ex(LIBSSH2_ALLOC_FUNC((*my_alloc)),
Expand All @@ -416,6 +446,8 @@ LIBSSH2_API int libssh2_banner_set(LIBSSH2_SESSION *session,
const char *banner);

LIBSSH2_API int libssh2_session_startup(LIBSSH2_SESSION *session, int sock);
LIBSSH2_API int libssh2_session_handshake(LIBSSH2_SESSION *session,
libssh2_socket_t sock);
LIBSSH2_API int libssh2_session_disconnect_ex(LIBSSH2_SESSION *session,
int reason,
const char *description,
Expand Down Expand Up @@ -702,6 +734,13 @@ LIBSSH2_API int libssh2_channel_flush_ex(LIBSSH2_CHANNEL *channel,
libssh2_channel_flush_ex((channel), SSH_EXTENDED_DATA_STDERR)

LIBSSH2_API int libssh2_channel_get_exit_status(LIBSSH2_CHANNEL* channel);
LIBSSH2_API int libssh2_channel_get_exit_signal(LIBSSH2_CHANNEL* channel,
char **exitsignal,
size_t *exitsignal_len,
char **errmsg,
size_t *errmsg_len,
char **langtag,
size_t *langtag_len);
LIBSSH2_API int libssh2_channel_send_eof(LIBSSH2_CHANNEL *channel);
LIBSSH2_API int libssh2_channel_eof(LIBSSH2_CHANNEL *channel);
LIBSSH2_API int libssh2_channel_wait_eof(LIBSSH2_CHANNEL *channel);
Expand Down
Binary file modified lib/libssh2.a
Binary file not shown.

0 comments on commit e603feb

Please sign in to comment.