# # spec file for package libssh2_org # # Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Summary: A library implementing the SSH2 protocol License: BSD-3-Clause Group: Development/Libraries/C and C++ Name: libssh2_org Version: 1.7.0 Release: 1.1 Url: http://www.libssh2.org/ %define pkg_name libssh2 Source0: http://www.libssh2.org/download/%{pkg_name}-%{version}.tar.gz Source1: http://www.libssh2.org/download/%{pkg_name}-%{version}.tar.gz.asc Source2: baselibs.conf Source3: libssh2_org.keyring BuildRequires: openssl-devel BuildRequires: pkgconfig BuildRequires: zlib-devel #for the test suite BuildRequires: groff BuildRequires: libtool BuildRequires: man BuildRequires: openssh # drops build cycle in Factory #!BuildIgnore: groff-full BuildRoot: %{_tmppath}/%{name}-%{version}-build Patch0: libssh2-ocloexec.patch %description libssh2 is a library implementing the SSH2 protocol as defined by Internet Drafts: SECSH-TRANS, SECSH-USERAUTH, SECSH-CONNECTION, SECSH-ARCH, SECSH-FILEXFER, SECSH-DHGEX, SECSH-NUMBERS, and SECSH-PUBLICKEY. %package -n libssh2-1 Summary: A library implementing the SSH2 protocol Group: Development/Libraries/C and C++ %description -n libssh2-1 libssh2 is a library implementing the SSH2 protocol as defined by Internet Drafts: SECSH-TRANS, SECSH-USERAUTH, SECSH-CONNECTION, SECSH-ARCH, SECSH-FILEXFER, SECSH-DHGEX, SECSH-NUMBERS, and SECSH-PUBLICKEY. %package -n libssh2-devel Summary: A library implementing the SSH2 protocol Group: Development/Libraries/C and C++ Requires: glibc-devel Requires: libssh2-1 = %{version} %description -n libssh2-devel libssh2 is a library implementing the SSH2 protocol as defined by Internet Drafts: SECSH-TRANS, SECSH-USERAUTH, SECSH-CONNECTION, SECSH-ARCH, SECSH-FILEXFER, SECSH-DHGEX, SECSH-NUMBERS, and SECSH-PUBLICKEY. %prep %setup -q -n %{pkg_name}-%{version} # problem with sle 11 sp1 target as it has older kernel and as such fail this %if 0%{?suse_version} > 1110 %patch0 -p1 %endif %build sed -i -e 's@AM_CONFIG_HEADER@AC_CONFIG_HEADERS@g' configure.ac cp src/libssh2_config.h.in example/libssh2_config.h # remove m4 macro files for libtool as they should be picked up by # autoreconf rm -v m4/libtool.m4 m4/lt* autoreconf -fiv export CFLAGS="%optflags -DOPENSSL_LOAD_CONF" %configure \ --enable-static --with-pic \ --disable-rpath --with-libz=%{_prefix} \ --with-openssl=%{_prefix} make %{?_smp_mflags} %if !0%{?sles_version} %if 0%{?suse_version} >= 1230 %check make check %endif %endif %install make install DESTDIR=%{buildroot} rm -f %{buildroot}%{_libdir}/*.la #%{buildroot}%{_libdir}/*.a %post -n libssh2-1 -p /sbin/ldconfig %postun -n libssh2-1 -p /sbin/ldconfig %files -n libssh2-1 %defattr(-,root,root) %{_libdir}/libssh2.so.1* %files -n libssh2-devel %defattr(-,root,root) %doc NEWS %{_libdir}/libssh2.so %{_libdir}/libssh2.a %{_includedir}/*.h %{_mandir}/man3/* %{_libdir}/pkgconfig/libssh2.pc %changelog * Tue Feb 23 2016 vcizek@suse.com - update to 1.7.0 * Fixes CVE-2016-0787 (boo#967026) * Changes: libssh2_session_set_last_error: Add function mac: Add support for HMAC-SHA-256 and HMAC-SHA-512 WinCNG: support for SHA256/512 HMAC kex: Added diffie-hellman-group-exchange-sha256 support OS/400 crypto library QC3 support * and many bugfixes * Fri Jun 12 2015 vcizek@suse.com - update to 1.6.0 Changes: Added CMake build system Added libssh2_userauth_publickey_frommemory() Bug fixes: wait_socket: wrong use of difftime() userauth: Fixed prompt text no longer being copied to the prompts struct mingw build: allow to pass custom CFLAGS Let mansyntax.sh work regardless of where it is called from Init HMAC_CTX before using it direct_tcpip: Fixed channel write WinCNG: fixed backend breakage OpenSSL: caused by introducing libssh2_hmac_ctx_init userauth.c: fix possible dereferences of a null pointer wincng: Added explicit clear memory feature to WinCNG backend openssl.c: fix possible segfault in case EVP_DigestInit fails wincng: fix return code of libssh2_md5_init() kex: do not ignore failure of libssh2_sha1_init() scp: fix that scp_send may transmit not initialised memory scp.c: improved command length calculation nonblocking examples: fix warning about unused tvdiff on Mac OS X configure: make clear-memory default but WARN if backend unsupported OpenSSL: Enable use of OpenSSL that doesn't have DSA OpenSSL: Use correct no-blowfish #define kex: fix libgcrypt memory leaks of bignum libssh2_channel_open: more detailed error message wincng: fixed memleak in (block) cipher destructor * Wed Mar 11 2015 vcizek@suse.com - update to 1.5.0 * fixes CVE-2015-1782 (bnc#921070) - tarball verification * added libssh2_org.keyring * added libssh2-1.5.0.tar.gz.asc Changes in 1.5.0: Added Windows Cryptography API: Next Generation based backend Bug fixes: Security Advisory: Using `SSH_MSG_KEXINIT` data unbounded, CVE-2015-1782 missing _libssh2_error in _libssh2_channel_write knownhost: Fix DSS keys being detected as unknown. knownhost: Restore behaviour of `libssh2_knownhost_writeline` with short buffer. libssh2.h: on Windows, a socket is of type SOCKET, not int libssh2_priv.h: a 1 bit bit-field should be unsigned windows build: do not export externals from static library Fixed two potential use-after-frees of the payload buffer Fixed a few memory leaks in error paths userauth: Fixed an attempt to free from stack on error agent_list_identities: Fixed memory leak on OOM knownhosts: Abort if the hosts buffer is too small sftp_close_handle: ensure the handle is always closed channel_close: Close the channel even in the case of errors docs: added missing libssh2_session_handshake.3 file docs: fixed a bunch of typos userauth_password: pass on the underlying error code _libssh2_channel_forward_cancel: accessed struct after free _libssh2_packet_add: avoid using uninitialized memory _libssh2_channel_forward_cancel: avoid memory leaks on error _libssh2_channel_write: client spins on write when window full windows build: fix build errors publickey_packet_receive: avoid junk in returned pointers channel_receive_window_adjust: store windows size always userauth_hostbased_fromfile: zero assign to avoid uninitialized use configure: change LIBS not LDFLAGS when checking for libs agent_connect_unix: make sure there's a trailing zero MinGW build: Fixed redefine warnings. sftpdir.c: added authentication method detection. Watcom build: added support for WinCNG build. configure.ac: replace AM_CONFIG_HEADER with AC_CONFIG_HEADERS sftp_statvfs: fix for servers not supporting statfvs extension knownhost.c: use LIBSSH2_FREE macro instead of free Fixed compilation using mingw-w64 knownhost.c: fixed that 'key_type_len' may be used uninitialized configure: Display individual crypto backends on separate lines examples on Windows: check for WSAStartup return code examples on Windows: check for socket return code agent.c: check return code of MapViewOfFile kex.c: fix possible NULL pointer de-reference with session->kex packet.c: fix possible NULL pointer de-reference within listen_state tests on Windows: check for WSAStartup return code userauth.c: improve readability and clarity of for-loops examples on Windows: use native SOCKET-type instead of int packet.c: i < 256 was always true and i would overflow to 0 kex.c: make sure mlist is not set to NULL session.c: check return value of session_nonblock in debug mode session.c: check return value of session_nonblock during startup userauth.c: make sure that sp_len is positive and avoid overflows knownhost.c: fix use of uninitialized argument variable wrote openssl: initialise the digest context before calling EVP_DigestInit() libssh2_agent_init: init ->fd to LIBSSH2_INVALID_SOCKET configure.ac: Add zlib to Requires.private in libssh2.pc if using zlib configure.ac: Rework crypto library detection configure.ac: Reorder --with-* options in --help output configure.ac: Call zlib zlib and not libz in text but keep option names Fix non-autotools builds: Always define the LIBSSH2_OPENSSL CPP macro sftp: seek: Don't flush buffers on same offset sftp: statvfs: Along error path, reset the correct 'state' variable. sftp: Add support for fsync (OpenSSH extension). _libssh2_channel_read: fix data drop when out of window comp_method_zlib_decomp: Improve buffer growing algorithm _libssh2_channel_read: Honour window_size_initial window_size: redid window handling for flow control reasons knownhosts: handle unknown key types * Mon Jun 24 2013 mvyskocil@suse.com - ignore groff-full to remove factory build cycle - add groff to build requires to make tests passing * Wed Apr 24 2013 boris@steki.net - fix building on older kernels and older OS / SLE * Thu Feb 28 2013 crrodriguez@opensuse.org - Use AC_CONFIG_HEADERS instead of AM_CONFIG_HEADER, fixes build with new automake * Tue Jan 8 2013 vcizek@suse.com - update to 1.4.3 compression: add support for zlib@openssh.com Bug fixes: sftp_read: return error if a too large package arrives libssh2_hostkey_hash.3: update the description of return value examples: use stderr for messages, stdout for data openssl: do not leak memory when handling errors improved handling of disabled MD5 algorithm in OpenSSL known_hosts: Fail when parsing unknown keys in known_hosts file configure: gcrypt doesn't come with pkg-config support session_free: wrong variable used for keeping state libssh2_userauth_publickey_fromfile_ex.3: mention publickey == NULL comp_method_zlib_decomp: handle Z_BUF_ERROR when inflating Return LIBSSH2_ERROR_SOCKET_DISCONNECT on EOF when reading banner userauth.c: fread() from public key file to correctly detect any errors configure.ac: Add option to disable build of the example applications Added 'Requires.private:' line to libssh2.pc SFTP: filter off incoming "zombie" responses gettimeofday: no need for a replacement under cygwin SSH_MSG_CHANNEL_REQUEST: default to want_reply win32/libssh2_config.h: Remove hardcoded #define LIBSSH2_HAVE_ZLIB build error with gcrypt backend always do "forced" window updates to avoid corner case stalls aes: the init function fails when OpenSSL has AES support transport_send: Finish in-progress key exchange before sending data channel_write: acknowledge transport errors examples/x11.c: Make sure sizeof passed to read operation is correct examples/x11.c:,Fix suspicious sizeof usage sftp_packet_add: verify the packet before accepting it SFTP: preserve the original error code more sftp_packet_read: adjust window size as necessary Use safer snprintf rather then sprintf in several places Define and use LIBSSH2_INVALID_SOCKET instead of INVALID_SOCKET sftp_write: cannot return acked data *and* EAGAIN sftp_read: avoid data *and* EAGAIN libssh2.h: Add missing prototype for libssh2_session_banner_set() - dropped patches (already in the upstream) 0004-libssh2.h-Add-missing-prototype-for-libssh2_session_.patch 0005-Add-symbol-versioning.patch 0006-missing-libssh2_session_banner_set.patch * Thu Feb 2 2012 crrodriguez@opensuse.org - fix license * Thu Feb 2 2012 crrodriguez@opensuse.org - Update to version 1.4.0 plus git bugfixes * Tue Dec 27 2011 crrodriguez@opensuse.org - Refresh patches. * Thu Dec 1 2011 jengelh@medozas.de - Remove redundant/unwanted tags/section (cf. specfile guidelines) * Thu Dec 1 2011 crrodriguez@opensuse.org - open library file descriptors with O_CLOEXEC * Fri Oct 21 2011 crrodriguez@opensuse.org - Update to version 1.3.0 * sftp_read: advance offset correctly for buffered copies * libssh2_sftp_seek64: flush packetlist and buffered data * _libssh2_packet_add: adjust window size when truncating * sftp_read: a short read is not end of file * Sat Oct 1 2011 dmueller@suse.de - document the reason for the testsuite failure * Fri Sep 30 2011 crrodriguez@opensuse.org - Workaround qemu-arm problems. * Tue Sep 6 2011 crrodriguez@opensuse.org - respect user's openssl.cnf engine configuration, might want to do crypto with aes-ni, intel-accell or use rdrand * Wed Aug 17 2011 crrodriguez@opensuse.org - Update to version 1.2.9 * Added libssh2_session_set_timeout() and libssh2_session_get_timeout() to make blocking calls get a timeout * userauth_keyboard_interactive: fix buffer overflow * Fri Oct 29 2010 cristian.rodriguez@opensuse.org - Update 1.2.7 - Better handling of invalid key files - inputchecks: make lots of API functions check for NULL pointers - libssh2_session_callback_set: extended the man page - SFTP: limit write() to not produce overly large packets - agent: make libssh2_agent_userauth() work blocking properly - _libssh2_userauth_publickey: reject method names longer than the data - channel_free: ignore problems with channel_close() - typedef: make ssize_t get typedef without LIBSSH2_WIN32 - _libssh2_wait_socket: poll needs milliseconds - libssh2_wait_socket: reset error code to "leak" EAGAIN less - Added include for sys/select.h to get fd.set on some platforms - session_free: free more data to avoid memory leaks - openssl: make use of the EVP interface - Fix underscore typo for 64-bit printf format specifiers on Windows - Make libssh2_debug() create a correctly terminated string - userauth_hostbased_fromfile: packet length too short - handshake: Compression enabled at the wrong time - Don't overflow MD5 server hostkey- * Sun Aug 8 2010 cristian.rodriguez@opensuse.org - restore %%build section, accidentally removed * Mon Aug 2 2010 cristian.rodriguez@opensuse.org - update to libssh2 1.2.6 * Added libssh2_sftp_statvfs() and libssh2_sftp_fstatvfs() * Added libssh2_knownhost_checkp() * Added libssh2_scp_send64() * fail to init SFTP if session isn't already authenticated * sftp_close_handle: add precaution to not access NULL pointer * channel_write: if data has been sent, don't return EAGAIN * Tue Apr 6 2010 crrodriguez@opensuse.org - fix build in older products * Mon Feb 22 2010 crrodriguez@opensuse.org - update to version 1.2.4 * Mon Feb 1 2010 jengelh@medozas.de - package baselibs.conf * Sat Nov 28 2009 crrodriguez@opensuse.org - Update snapshot * Wed Sep 30 2009 crrodriguez@opensuse.org - add visbility support * Wed Sep 30 2009 crrodriguez@opensuse.org - update to version 1.2.1 see NEWS for details * Mon Aug 10 2009 crrodriguez@suse.de - update to version 1.2 see NEWS for details * Wed May 27 2009 crrodriguez@suse.de - do not provide or obsolete libssh2 [bnc#507444] * Sat May 9 2009 crrodriguez@suse.de - update to version 1.1, see NEWS for details * Mon Jan 5 2009 crrodriguez@suse.de - update to version 1.0, see large list of changes in the NEWS file * Tue Oct 14 2008 crrodriguez@suse.de - rename package to avoid all sorts of conflicts with the other "libssh" package * Thu Aug 14 2008 crrodriguez@suse.de - update current snap , version 20080814 * Sean Peterson fixed a key re-exchange bug: http://daniel.haxx.se/projects/libssh2/mail/libssh2-devel-archive-2008-06/0002.shtml * Thu Jun 26 2008 crrodriguez@suse.de - update to version 0.19.0-20080626, two bugfixes * Mon Jun 23 2008 crrodriguez@suse.de - no longer needs fno-strict-aliasing * Mon Jun 23 2008 crrodriguez@suse.de - update to libssh2-0.19.0-20080622 * Sun Dec 23 2007 crrodriguez@suse.de - update to 0.18 final * Fri Aug 31 2007 crrodriguez@suse.de - update snap * Sat Apr 14 2007 judas_iscariote@shorewall.net - update snapshot.