Skip to content
This repository was archived by the owner on Jan 26, 2026. It is now read-only.

Commit b4b50a6

Browse files
committed
Merge commit '68fc17caac6d87e7cfe4a89113127625c00b4dd5'
2 parents 4c3ba96 + 68fc17c commit b4b50a6

45 files changed

Lines changed: 1117 additions & 257 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules")
1010
include(DefineCMakeDefaults)
1111
include(DefineCompilerFlags)
1212

13-
project(libssh VERSION 0.8.5 LANGUAGES C)
13+
project(libssh VERSION 0.8.6 LANGUAGES C)
1414

1515
# global needed variable
1616
set(APPLICATION_NAME ${PROJECT_NAME})
@@ -22,7 +22,7 @@ set(APPLICATION_NAME ${PROJECT_NAME})
2222
# Increment AGE. Set REVISION to 0
2323
# If the source code was changed, but there were no interface changes:
2424
# Increment REVISION.
25-
set(LIBRARY_VERSION "4.7.2")
25+
set(LIBRARY_VERSION "4.7.3")
2626
set(LIBRARY_SOVERSION "4")
2727

2828
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
@@ -39,6 +39,9 @@ include(CompilerChecks.cmake)
3939
include(MacroEnsureOutOfSourceBuild)
4040
macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source build. Please create a separate build directory and run 'cmake /path/to/${PROJECT_NAME} [options]' there.")
4141

42+
# Copy library files to a lib sub-directory
43+
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
44+
4245
# search for libraries
4346
if (WITH_ZLIB)
4447
find_package(ZLIB REQUIRED)
@@ -116,11 +119,22 @@ install(
116119
)
117120
endif (UNIX)
118121

119-
# cmake config files
122+
# CMake config files
123+
include(CMakePackageConfigHelpers)
124+
120125
set(LIBSSH_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}ssh${CMAKE_SHARED_LIBRARY_SUFFIX})
121126

122-
configure_file(${PROJECT_NAME}-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake @ONLY)
123-
configure_file(${PROJECT_NAME}-config-version.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake @ONLY)
127+
# libssh-config-version.cmake
128+
write_basic_package_version_file(libssh-config-version.cmake
129+
VERSION ${PROJECT_VERSION}
130+
COMPATIBILITY SameMajorVersion)
131+
132+
# libssh-config.cmake
133+
configure_package_config_file(${PROJECT_NAME}-config.cmake.in
134+
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake
135+
INSTALL_DESTINATION ${CMAKE_INSTALL_DIR}/${PROJECT_NAME}
136+
PATH_VARS INCLUDE_INSTALL_DIR LIB_INSTALL_DIR)
137+
124138
install(
125139
FILES
126140
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake
@@ -131,10 +145,6 @@ install(
131145
devel
132146
)
133147

134-
135-
# in tree build settings
136-
configure_file(libssh-build-tree-settings.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/libssh-build-tree-settings.cmake @ONLY)
137-
138148
if (WITH_EXAMPLES)
139149
add_subdirectory(examples)
140150
endif (WITH_EXAMPLES)

COPYING

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,15 @@ FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
455455
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
456456
DAMAGES.
457457

458-
Linking with OpenSSL
459-
17. In addition, as a special exception, we give permission to link the code of its release of libssh with the OpenSSL project's "OpenSSL" library (or with modified versions of it that use the same license as the "OpenSSL" library), and distribute the linked executables. You must obey the GNU Lesser General Public License in all respects for all of the code used other than "OpenSSL". If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version.
458+
Linking with OpenSSL
459+
460+
17. In addition, as a special exception, we give permission to link the code
461+
of its release of libssh with the OpenSSL project's "OpenSSL" library (or with
462+
modified versions of it that use the same license as the "OpenSSL" library),
463+
and distribute the linked executables. You must obey the GNU Lesser General
464+
Public License in all respects for all of the code used other than "OpenSSL".
465+
If you modify this file, you may extend this exception to your version of the
466+
file, but you are not obligated to do so. If you do not wish to do so, delete
467+
this exception statement from your version.
468+
460469
END OF TERMS AND CONDITIONS

ChangeLog

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
ChangeLog
22
==========
33

4+
version 0.8.6 (released 2018-12-24)
5+
* Fixed compilation issues with different OpenSSL versions
6+
* Fixed StrictHostKeyChecking in new knownhosts API
7+
* Fixed ssh_send_keepalive() with packet filter
8+
* Fixed possible crash with knownhosts options
9+
* Fixed issus with rekeying
10+
* Fixed strong ECDSA keys
11+
* Fixed some issues with rsa-sha2 extentions
12+
* Fixed access violation in ssh_init() (static linking)
13+
* Fixed ssh_channel_close() handling
14+
415
version 0.8.5 (released 2018-10-29)
516
* Added support to get known_hosts locations with ssh_options_get()
617
* Fixed preferred algorithm for known hosts negotiations

include/libssh/channels.h

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,16 @@ enum ssh_channel_state_e {
4848
};
4949

5050
/* The channel has been closed by the remote side */
51-
#define SSH_CHANNEL_FLAG_CLOSED_REMOTE 0x1
51+
#define SSH_CHANNEL_FLAG_CLOSED_REMOTE 0x0001
52+
53+
/* The channel has been closed locally */
54+
#define SSH_CHANNEL_FLAG_CLOSED_LOCAL 0x0002
55+
5256
/* The channel has been freed by the calling program */
53-
#define SSH_CHANNEL_FLAG_FREED_LOCAL 0x2
57+
#define SSH_CHANNEL_FLAG_FREED_LOCAL 0x0004
58+
5459
/* the channel has not yet been bound to a remote one */
55-
#define SSH_CHANNEL_FLAG_NOT_BOUND 0x4
60+
#define SSH_CHANNEL_FLAG_NOT_BOUND 0x0008
5661

5762
struct ssh_channel_struct {
5863
ssh_session session; /* SSH_SESSION pointer */
@@ -98,5 +103,9 @@ int ssh_channel_flush(ssh_channel channel);
98103
uint32_t ssh_channel_new_id(ssh_session session);
99104
ssh_channel ssh_channel_from_local(ssh_session session, uint32_t id);
100105
void ssh_channel_do_free(ssh_channel channel);
106+
int ssh_global_request(ssh_session session,
107+
const char *request,
108+
ssh_buffer buffer,
109+
int reply);
101110

102111
#endif /* CHANNELS_H_ */

include/libssh/libssh.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
/* libssh version */
8080
#define LIBSSH_VERSION_MAJOR 0
8181
#define LIBSSH_VERSION_MINOR 8
82-
#define LIBSSH_VERSION_MICRO 5
82+
#define LIBSSH_VERSION_MICRO 6
8383

8484
#define LIBSSH_VERSION_INT SSH_VERSION_INT(LIBSSH_VERSION_MAJOR, \
8585
LIBSSH_VERSION_MINOR, \

include/libssh/pki.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ int ssh_pki_export_signature_blob(const ssh_signature sign,
110110
int ssh_pki_import_signature_blob(const ssh_string sig_blob,
111111
const ssh_key pubkey,
112112
ssh_signature *psig);
113-
int ssh_pki_signature_verify_blob(ssh_session session,
114-
ssh_string sig_blob,
115-
const ssh_key key,
116-
unsigned char *digest,
117-
size_t dlen);
113+
int ssh_pki_signature_verify(ssh_session session,
114+
ssh_signature sig,
115+
const ssh_key key,
116+
unsigned char *digest,
117+
size_t dlen);
118118

119119
/* SSH Public Key Functions */
120120
int ssh_pki_export_pubkey_blob(const ssh_key key,

include/libssh/session.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,6 @@ struct ssh_session_struct {
164164

165165
struct ssh_list *channels; /* linked list of channels */
166166
int maxchannel;
167-
int exec_channel_opened; /* version 1 only. more
168-
info in channels1.c */
169167
ssh_agent agent; /* ssh agent */
170168

171169
/* keyb interactive data */

libssh-build-tree-settings.cmake.in

Lines changed: 0 additions & 1 deletion
This file was deleted.

libssh-config-version.cmake.in

Lines changed: 0 additions & 11 deletions
This file was deleted.

libssh-config.cmake.in

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
get_filename_component(LIBSSH_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
1+
@PACKAGE_INIT@
22

3-
if (EXISTS "${LIBSSH_CMAKE_DIR}/CMakeCache.txt")
4-
# In build tree
5-
include(${LIBSSH_CMAKE_DIR}/libssh-build-tree-settings.cmake)
3+
if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/CMakeCache.txt")
4+
# In tree build
5+
set_and_check(LIBSSH_INCLUDE_DIR "${CMAKE_CURRENT_LIST_DIR}/include")
6+
set_and_check(LIBSSH_LIBRARIES "${CMAKE_CURRENT_LIST_DIR}/lib/@LIBSSH_LIBRARY_NAME@")
67
else()
7-
set(LIBSSH_INCLUDE_DIR @INCLUDE_INSTALL_DIR@)
8+
set_and_check(LIBSSH_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
9+
set_and_check(LIBSSH_LIBRARIES "@PACKAGE_LIB_INSTALL_DIR@/@LIBSSH_LIBRARY_NAME@")
810
endif()
911

10-
set(LIBSSH_LIBRARY @LIB_INSTALL_DIR@/@LIBSSH_LIBRARY_NAME@)
11-
set(LIBSSH_LIBRARIES @LIB_INSTALL_DIR@/@LIBSSH_LIBRARY_NAME@)
12+
# For backward compatibility
13+
set(LIBSSH_LIBRARY ${LIBSSH_LIBRARIES})
1214

13-
set(LIBSSH_THREADS_LIBRARY @LIB_INSTALL_DIR@/@LIBSSH_THREADS_LIBRARY_NAME@)
14-
15-
mark_as_advanced(LIBSSH_LIBRARIES LIBSSH_INCLUDE_DIR)
15+
mark_as_advanced(LIBSSH_LIBRARIES LIBSSH_LIBRARY LIBSSH_INCLUDE_DIR)

0 commit comments

Comments
 (0)