Skip to content

Commit c6e03bc

Browse files
author
Pan
committed
Added libssh 0.7.5 source
1 parent e7a56f6 commit c6e03bc

File tree

242 files changed

+73003
-0
lines changed

Some content is hidden

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

242 files changed

+73003
-0
lines changed

libssh/.clang_complete

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
-DWITH_SERVER=1
2+
-DWITH_GSSAPI=1
3+
-DWITH_ZLIB=1
4+
-DWITH_SFTP=1
5+
-DWITH_SSH1=1
6+
-DWITH_PCAP=1
7+
-DHAVE_ECDH=1
8+
-DHAVE_ECC=1
9+
-Iinclude/libssh
10+
-Iinclude
11+
-Ibuild
12+
-Itests
13+
-Isrc

libssh/AUTHORS

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Author(s):
2+
Aris Adamantiadis <aris@0xbadc0de.be> (project initiator)
3+
4+
Andreas Schneider <asn@cryptomilk.org> (developer)
5+
6+
Nick Zitzmann <seiryu (at) comcast (dot) net> (mostly client SFTP stuff)
7+
8+
Norbert Kiesel <nkiesel (at) tbdnetworks (dot) com> (getaddrinfo and other patches)
9+
10+
Jean-Philippe Garcia Ballester <giga (at) le-pec (dot) org> (Port to libgcrypt and configure.in voodoo, debian packaging)
11+
12+
Contributor(s):
13+
14+
Laurent Bigonville <bigon (at) bigon (dot) be> (debian packaging)
15+

libssh/BSD

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Some parts are under the BSDv2 License :
2+
3+
4+
Copyright (c) 2000 Markus Friedl. All rights reserved.
5+
Redistribution and use in source and binary forms, with or without
6+
modification, are permitted provided that the following conditions
7+
are met:
8+
1. Redistributions of source code must retain the above copyright
9+
notice, this list of conditions and the following disclaimer.
10+
2. Redistributions in binary form must reproduce the above copyright
11+
notice, this list of conditions and the following disclaimer in the
12+
documentation and/or other materials provided with the distribution.
13+
14+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15+
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16+
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17+
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18+
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19+
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23+
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24+

libssh/CMakeLists.txt

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
project(libssh C)
2+
3+
# Required cmake version
4+
cmake_minimum_required(VERSION 2.8.5)
5+
6+
# global needed variables
7+
set(APPLICATION_NAME ${PROJECT_NAME})
8+
9+
set(APPLICATION_VERSION_MAJOR "0")
10+
set(APPLICATION_VERSION_MINOR "7")
11+
set(APPLICATION_VERSION_PATCH "5")
12+
13+
set(APPLICATION_VERSION "${APPLICATION_VERSION_MAJOR}.${APPLICATION_VERSION_MINOR}.${APPLICATION_VERSION_PATCH}")
14+
15+
# SOVERSION scheme: CURRENT.AGE.REVISION
16+
# If there was an incompatible interface change:
17+
# Increment CURRENT. Set AGE and REVISION to 0
18+
# If there was a compatible interface change:
19+
# Increment AGE. Set REVISION to 0
20+
# If the source code was changed, but there were no interface changes:
21+
# Increment REVISION.
22+
set(LIBRARY_VERSION "4.4.2")
23+
set(LIBRARY_SOVERSION "4")
24+
25+
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
26+
set(CMAKE_MODULE_PATH
27+
${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules
28+
)
29+
30+
# add definitions
31+
include(DefineCMakeDefaults)
32+
include(DefinePlatformDefaults)
33+
include(DefineCompilerFlags)
34+
include(DefineInstallationPaths)
35+
include(DefineOptions.cmake)
36+
include(CPackConfig.cmake)
37+
38+
# disallow in-source build
39+
include(MacroEnsureOutOfSourceBuild)
40+
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.")
41+
42+
# search for libraries
43+
if (WITH_ZLIB)
44+
find_package(ZLIB REQUIRED)
45+
endif (WITH_ZLIB)
46+
47+
if (WITH_GCRYPT)
48+
find_package(GCrypt 1.5.0 REQUIRED)
49+
if (NOT GCRYPT_FOUND)
50+
message(FATAL_ERROR "Could not find GCrypt")
51+
endif (NOT GCRYPT_FOUND)
52+
else (WITH_GCRYPT)
53+
find_package(OpenSSL)
54+
if (NOT OPENSSL_FOUND)
55+
find_package(GCrypt)
56+
if (NOT GCRYPT_FOUND)
57+
message(FATAL_ERROR "Could not find OpenSSL or GCrypt")
58+
endif (NOT GCRYPT_FOUND)
59+
endif (NOT OPENSSL_FOUND)
60+
endif(WITH_GCRYPT)
61+
62+
# Find out if we have threading available
63+
set(CMAKE_THREAD_PREFER_PTHREADS ON)
64+
find_package(Threads)
65+
66+
if (WITH_GSSAPI)
67+
find_package(GSSAPI)
68+
endif (WITH_GSSAPI)
69+
70+
if (WITH_NACL)
71+
find_package(NaCl)
72+
if (NOT NACL_FOUND)
73+
set(WITH_NACL OFF)
74+
endif (NOT NACL_FOUND)
75+
endif (WITH_NACL)
76+
77+
# config.h checks
78+
include(ConfigureChecks.cmake)
79+
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
80+
81+
# check subdirectories
82+
add_subdirectory(doc)
83+
add_subdirectory(include)
84+
add_subdirectory(src)
85+
86+
# pkg-config file
87+
if (UNIX)
88+
configure_file(libssh.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh.pc)
89+
install(
90+
FILES
91+
${CMAKE_CURRENT_BINARY_DIR}/libssh.pc
92+
${CMAKE_CURRENT_BINARY_DIR}/libssh_threads.pc
93+
DESTINATION
94+
${LIB_INSTALL_DIR}/pkgconfig
95+
COMPONENT
96+
pkgconfig
97+
)
98+
99+
if (LIBSSH_THREADS)
100+
configure_file(libssh_threads.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/libssh_threads.pc)
101+
install(
102+
FILES
103+
${CMAKE_CURRENT_BINARY_DIR}/libssh.pc
104+
${CMAKE_CURRENT_BINARY_DIR}/libssh_threads.pc
105+
DESTINATION
106+
${LIB_INSTALL_DIR}/pkgconfig
107+
COMPONENT
108+
pkgconfig
109+
)
110+
endif (LIBSSH_THREADS)
111+
endif (UNIX)
112+
113+
# cmake config files
114+
set(LIBSSH_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}ssh${CMAKE_SHARED_LIBRARY_SUFFIX})
115+
set(LIBSSH_THREADS_LIBRARY_NAME ${CMAKE_SHARED_LIBRARY_PREFIX}ssh${CMAKE_SHARED_LIBRARY_SUFFIX})
116+
117+
configure_file(${PROJECT_NAME}-config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake @ONLY)
118+
configure_file(${PROJECT_NAME}-config-version.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake @ONLY)
119+
install(
120+
FILES
121+
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake
122+
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake
123+
DESTINATION
124+
${CMAKE_INSTALL_DIR}/${PROJECT_NAME}
125+
COMPONENT
126+
devel
127+
)
128+
129+
130+
# in tree build settings
131+
configure_file(libssh-build-tree-settings.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/libssh-build-tree-settings.cmake @ONLY)
132+
133+
if (WITH_EXAMPLES)
134+
add_subdirectory(examples)
135+
endif (WITH_EXAMPLES)
136+
137+
if (WITH_TESTING)
138+
find_package(CMocka REQUIRED)
139+
include(AddCMockaTest)
140+
add_subdirectory(tests)
141+
endif (WITH_TESTING)
142+
143+
144+
message(STATUS "********************************************")
145+
message(STATUS "********** ${PROJECT_NAME} build options : **********")
146+
147+
message(STATUS "zlib support: ${WITH_ZLIB}")
148+
message(STATUS "libgcrypt support: ${WITH_GCRYPT}")
149+
message(STATUS "libnacl support: ${WITH_NACL}")
150+
message(STATUS "SSH-1 support: ${WITH_SSH1}")
151+
message(STATUS "SFTP support: ${WITH_SFTP}")
152+
message(STATUS "Server support : ${WITH_SERVER}")
153+
message(STATUS "GSSAPI support : ${WITH_GSSAPI}")
154+
message(STATUS "Pcap debugging support : ${WITH_PCAP}")
155+
message(STATUS "With static library: ${WITH_STATIC_LIB}")
156+
message(STATUS "Unit testing: ${WITH_TESTING}")
157+
message(STATUS "Client code Unit testing: ${WITH_CLIENT_TESTING}")
158+
if (WITH_INTERNAL_DOC)
159+
message(STATUS "Internal documentation generation")
160+
else (WITH_INTERNAL_DOC)
161+
message(STATUS "Public API documentation generation")
162+
endif (WITH_INTERNAL_DOC)
163+
message(STATUS "Benchmarks: ${WITH_BENCHMARKS}")
164+
message(STATUS "********************************************")
165+

0 commit comments

Comments
 (0)