   Changelog for the libssh2 project. Generated with git2news.pl

GitHub (19 Jun 2019)
- [Will Cosgrove brought this change]

  1.9 Formatting

- [Will Cosgrove brought this change]

  1.9 Release notes

Will Cosgrove (17 May 2019)
- [Alexander Curtiss brought this change]

  libgcrypt.c : Fixed _libssh2_rsa_sha1_sign memory leak. (#370)
  
  File: libgcrypt.c
  
  Notes : Added calls to gcry_sexp_release to free memory allocated by gcry_sexp_find_token
  
  Credit :
  Reporter : beckmi
  PR by: Alexander Curtiss

- [Orivej Desh brought this change]

  libssh2_priv.h : Fix musl build warning on sys/poll.h (#346)
  
  File : libssh2_priv.h
  
  Notes :
  musl prints `redirecting incorrect #include <sys/poll.h> to <poll.h>`
  http://git.musl-libc.org/cgit/musl/commit/include/sys/poll.h?id=54446d730cfb17c5f7bcf57f139458678f5066cc
  
  poll is defined by POSIX to be in poll.h:
  http://pubs.opengroup.org/onlinepubs/7908799/xsh/poll.html
  
  Credit : Orivej Desh

GitHub (1 May 2019)
- [Will Cosgrove brought this change]

  kex.c : additional bounds checks in diffie_hellman_sha1/256 (#361)
  
  Files : kex.c, misc.c, misc.h
  
  Notes :
  Fixed possible out of bounds memory access when reading malformed data in diffie_hellman_sha1() and diffie_hellman_sha256().
  
  Added _libssh2_copy_string() to misc.c to return an allocated and filled char buffer from a string_buf offset. Removed no longer needed s var in kmdhgGPshakex_state_t.

Will Cosgrove (26 Apr 2019)
- [Tseng Jun brought this change]

  sftp.c : sftp_bin2attr() Correct attrs->gid assignment (#366)
  
  Regression with fix for #339
  
  Credit : Tseng Jun

- [Tseng Jun brought this change]

  kex.c : Correct type cast in curve25519_sha256() (#365)

GitHub (24 Apr 2019)
- [Will Cosgrove brought this change]

  transport.c : scope local total_num var (#364)
  
  file : transport.c
  notes : move local `total_num` variable inside of if block to prevent scope access issues which caused #360.

Will Cosgrove (24 Apr 2019)
- [doublex brought this change]

  transport.c : fixes bounds check if partial packet is read
  
  Files : transport.c
  
  Issue : #360
  
  Notes :
   'p->total_num' instead of local value total_num when doing bounds check.
  
  Credit : Doublex

GitHub (23 Apr 2019)
- [Will Cosgrove brought this change]

  Editor config file for source files (#322)
  
  Simple start to an editor config file when editing source files to make sure they are configured correctly.

- [Will Cosgrove brought this change]

  misc.c : String buffer API improvements (#332)
  
  Files : misc.c, hostkey.c, kex.c, misc.h, openssl.c, sftp.c
  
  Notes :
  * updated _libssh2_get_bignum_bytes and _libssh2_get_string. Now pass in length as an argument instead of returning it to keep signedness correct. Now returns -1 for failure, 0 for success.
  
  _libssh2_check_length now returns 0 on success and -1 on failure to match the other string_buf functions. Added comment to _libssh2_check_length.
  
  Credit : Will Cosgrove

Will Cosgrove (19 Apr 2019)
- [doublex brought this change]

  mbedtls.c : _libssh2_mbedtls_rsa_new_private_frommemory() allow private-key from memory (#359)
  
  File : mbedtls.c
  
  Notes: _libssh2_mbedtls_rsa_new_private_frommemory() fixes private-key from memory reading to by adding NULL terminator before parsing; adds passphrase support.
  
  Credit: doublex

- [Ryan Kelley brought this change]

  Session.c : banner_receive() from leaking when accessing non ssh ports (#356)
  
  File : session.c
  
  Release previous banner in banner_receive() if the session is reused after a failed connection.
  
  Credit : Ryan Kelley

GitHub (11 Apr 2019)
- [Will Cosgrove brought this change]

  Formatting in agent.c
  
  Removed whitespace.

- [Will Cosgrove brought this change]

  Fixed formatting in agent.c
  
  Quiet linter around a couple if blocks and pointer.

Will Cosgrove (11 Apr 2019)
- [Zhen-Huan HWANG brought this change]

  sftp.c : discard and reset oversized packet in sftp_packet_read() (#269)
  
  file : sftp.c
  
  notes : when sftp_packet_read() encounters an sftp packet which exceeds SFTP max packet size it now resets the reading state so it can continue reading.
  
  credit : Zhen-Huan HWANG

GitHub (11 Apr 2019)
- [Will Cosgrove brought this change]

  Add agent functions libssh2_agent_get_identity_path() and libssh2_agent_set_identity_path() (#308)
  
  File : agent.c
  
  Notes :
  Libssh2 uses the SSH_AUTH_SOCK env variable to read the system agent location. However, when using a custom agent path you have to set this value using setenv which is not thread-safe. The new functions allow for a way to set a custom agent socket path in a thread safe manor.

- [Will Cosgrove brought this change]

  Simplified _libssh2_check_length (#350)
  
  * Simplified _libssh2_check_length
  
  misc.c : _libssh2_check_length()
  
  Removed cast and improved bounds checking and format.
  
  Credit : Yuriy M. Kaminskiy

- [Will Cosgrove brought this change]

  _libssh2_check_length() : additional bounds check (#348)
  
  Misc.c : _libssh2_check_length()
  
  Ensure the requested length is less than the total length before doing the additional bounds check

Daniel Stenberg (25 Mar 2019)
- misc: remove 'offset' from string_buf
  
  It isn't necessary.
  
  Closes #343

- sftp: repair mtime from e1ead35e475
  
  A regression from e1ead35e4759 broke the SFTP mtime logic in
  sftp_bin2attr
  
  Also simplified the _libssh2_get_u32/u64 functions slightly.
  
  Closes #342

- session_disconnect: don't zero state, just clear the right bit
  
  If we clear the entire field, the freeing of data in session_free() is
  skipped. Instead just clear the bit that risk making the code get stuck
  in the transport functions.
  
  Regression from 4d66f6762ca3fc45d9.
  
  Reported-by: dimmaq on github
  Fixes #338
  Closes #340

- libssh2_sftp.h: restore broken ABI
  
  Commit 41fbd44 changed variable sizes/types in a public struct which
  broke the ABI, which breaks applications!
  
  This reverts that change.
  
  Closes #339

- style: make includes and examples code style strict
  
  make travis and the makefile rule verify them too
  
  Closes #334

GitHub (21 Mar 2019)
- [Daniel Stenberg brought this change]

  create a github issue template

Daniel Stenberg (21 Mar 2019)
- stale-bot: activated
  
  The stale bot will automatically mark stale issues (inactive for 90
  days) and if still untouched after 21 more days, close them.
  
  See https://probot.github.io/apps/stale/

- libssh2_session_supported_algs.3: fix formatting mistakes
  
  Reported-by: Max Horn
  Fixes #57

- [Zenju brought this change]

  libssh2.h: Fix Error C2371 'ssize_t': redefinition
  
  Closes #331

- travis: add code style check
  
  Closes #324

- code style: unify code style
  
  Indent-level: 4
  Max columns: 79
  No spaces after if/for/while
  Unified brace positions
  Unified white spaces

- src/checksrc.pl: code style checker
  
  imported as-is from curl

Will Cosgrove (19 Mar 2019)
- Merge branch 'MichaelBuckley-michaelbuckley-security-fixes'

- Silence unused var warnings (#329)
  
  Silence warnings about unused variables in this test

- Removed unneeded > 0 check
  
  When checking `userauth_kybd_num_prompts > 100` we don't care if it's also above zero.

- [Matthew D. Fuller brought this change]

  Spell OpenSS_H_ right when talking about their specific private key (#321)
  
  Good catch, thanks.

GitHub (19 Mar 2019)
- [Will Cosgrove brought this change]

  Silence unused var warnings (#329)
  
  Silence warnings about unused variables in this test

Michael Buckley (19 Mar 2019)
- Fix more scope and printf warning errors

- Silence unused variable warning

GitHub (19 Mar 2019)
- [Will Cosgrove brought this change]

  Removed unneeded > 0 check
  
  When checking `userauth_kybd_num_prompts > 100` we don't care if it's also above zero.

Will Cosgrove (19 Mar 2019)
- [Matthew D. Fuller brought this change]

  Spell OpenSS_H_ right when talking about their specific private key (#321)
  
  Good catch, thanks.

Michael Buckley (18 Mar 2019)
- Fix errors identified by the build process

- Fix casting errors after merge

GitHub (18 Mar 2019)
- [Michael Buckley brought this change]

  Merge branch 'master' into michaelbuckley-security-fixes

Michael Buckley (18 Mar 2019)
- Move fallback SIZE_MAX and UINT_MAX to libssh2_priv.h

- Fix type and logic issues with _libssh2_get_u64

Daniel Stenberg (17 Mar 2019)
- examples: fix various compiler warnings

- lib: fix various compiler warnings

- session: ignore pedantic warnings for funcpointer <=> void *

- travis: add a build using configure
  
  Closes #320

- configure: provide --enable-werror

- appveyor: remove old builds that mostly cause failures
  
  ... and only run on master branch.
  
  Closes #323

- cmake: add two missing man pages to get installed too
  
  Both libssh2_session_handshake.3 and
  libssh2_userauth_publickey_frommemory.3 were installed by the configure
  build already.
  
  Reported-by: Arfrever on github
  Fixes #278

- include/libssh2.h: warning: "_WIN64" is not defined, evaluates to 0
  
  We don't use #if for defines that might not be defined.

- pem: //-comments are not allowed

Will Cosgrove (14 Mar 2019)
- [Daniel Stenberg brought this change]

  userauth: fix "Function call argument is an uninitialized value" (#318)
  
  Detected by scan-build.

- fixed unsigned/signed issue

Daniel Stenberg (15 Mar 2019)
- session_disconnect: clear state
  
  If authentication is started but not completed before the application
  gives up and instead wants to shut down the session, the '->state' field
  might still be set and thus effectively dead-lock session_disconnect.
  
  This happens because both _libssh2_transport_send() and
  _libssh2_transport_read() refuse to do anything as long as state is set
  without the LIBSSH2_STATE_KEX_ACTIVE bit.
  
  Reported in curl bug https://github.com/curl/curl/issues/3650
  
  Closes #310

Will Cosgrove (14 Mar 2019)
- Release notes from 1.8.1

Michael Buckley (14 Mar 2019)
- Use string_buf in sftp_init().

- Guard against out-of-bounds reads in publickey.c

- Guard against out-of-bounds reads in session.c

- Guard against out-of-bounds reads in userauth.c

- Use LIBSSH2_ERROR_BUFFER_TOO_SMALL instead of LIBSSH2_ERROR_OUT_OF_BOUNDARY in sftp.c

- Additional bounds checking in sftp.c

- Additional length checks to prevent out-of-bounds reads and writes in _libssh2_packet_add(). https://libssh2.org/CVE-2019-3862.html

- Add a required_size parameter to sftp_packet_require et. al. to require callers of these functions to handle packets that are too short. https://libssh2.org/CVE-2019-3860.html

- Check the length of data passed to sftp_packet_add() to prevent out-of-bounds reads.

- Prevent zero-byte allocation in sftp_packet_read() which could lead to an out-of-bounds read. https://libssh2.org/CVE-2019-3858.html

- Sanitize padding_length - _libssh2_transport_read(). https://libssh2.org/CVE-2019-3861.html
  
  This prevents an underflow resulting in a potential out-of-bounds read if a server sends a too-large padding_length, possibly with malicious intent.

- Defend against writing beyond the end of the payload in _libssh2_transport_read().

- Defend against possible integer overflows in comp_method_zlib_decomp.

GitHub (14 Mar 2019)
- [Will Cosgrove brought this change]

  Security fixes (#315)
  
  * Bounds checks
  
  Fixes for CVEs
  https://www.libssh2.org/CVE-2019-3863.html
  https://www.libssh2.org/CVE-2019-3856.html
  
  * Packet length bounds check
  
  CVE
  https://www.libssh2.org/CVE-2019-3855.html
  
  * Response length check
  
  CVE
  https://www.libssh2.org/CVE-2019-3859.html
  
  * Bounds check
  
  CVE
  https://www.libssh2.org/CVE-2019-3857.html
  
  * Bounds checking
  
  CVE
  https://www.libssh2.org/CVE-2019-3859.html
  
  and additional data validation
  
  * Check bounds before reading into buffers
  
  * Bounds checking
  
  CVE
  https://www.libssh2.org/CVE-2019-3859.html
  
  * declare SIZE_MAX and UINT_MAX if needed

- [Will Cosgrove brought this change]

  fixed type warnings (#309)

- [Will Cosgrove brought this change]

  Bumping version number for pending 1.8.1 release

Will Cosgrove (4 Mar 2019)
- [Daniel Stenberg brought this change]

  _libssh2_string_buf_free: use correct free (#304)
  
  Use LIBSSH2_FREE() here, not free(). We allow memory function
  replacements so free() is rarely the right choice...

GitHub (26 Feb 2019)
- [Will Cosgrove brought this change]

  Fix for building against libreSSL #302
  
  Changed to use the check we use elsewhere.

- [Will Cosgrove brought this change]

  Fix for when building against LibreSSL #302

Will Cosgrove (25 Feb 2019)
- [gartens brought this change]

  docs: update libssh2_hostkey_hash.3 [ci skip] (#301)

GitHub (21 Feb 2019)
- [Will Cosgrove brought this change]

  fix malloc/free mismatches #296 (#297)

- [Will Cosgrove brought this change]

  Replaced malloc with calloc #295

- [Will Cosgrove brought this change]

  Abstracted OpenSSL calls out of hostkey.c (#294)

- [Will Cosgrove brought this change]

  Fix memory dealloc impedance mis-match #292 (#293)
  
  When using ed25519 host keys and a custom memory allocator.

- [Will Cosgrove brought this change]

  Added call to OpenSSL_add_all_digests() #288
  
  For OpenSSL 1.0.x we need to call OpenSSL_add_all_digests().

Will Cosgrove (12 Feb 2019)
- [Zhen-Huan HWANG brought this change]

  SFTP: increase maximum packet size to 256K (#268)
  
  to match implementations like OpenSSH.

- [Zenju brought this change]

  Fix https://github.com/libssh2/libssh2/pull/271 (#284)

GitHub (16 Jan 2019)
- [Will Cosgrove brought this change]

  Agent NULL check in shutdown #281

Will Cosgrove (15 Jan 2019)
- [Adrian Moran brought this change]

  mbedtls: Fix leak of 12 bytes by each key exchange. (#280)
  
  Correctly free ducts by calling _libssh2_mbedtls_bignum_free() in dtor.

- [alex-weaver brought this change]

  Fix error compiling on Win32 with STDCALL=ON (#275)

GitHub (8 Nov 2018)
- [Will Cosgrove brought this change]

  Allow default permissions to be used in sftp_mkdir (#271)
  
  Added constant LIBSSH2_SFTP_DEFAULT_MODE to use the server default permissions when making a new directory

Will Cosgrove (13 Sep 2018)
- [Giulio Benetti brought this change]

  openssl: fix dereferencing ambiguity potentially causing build failure (#267)
  
  When dereferencing from *aes_ctr_cipher, being a pointer itself,
  ambiguity can occur; fixed possible build errors.

Viktor Szakats (12 Sep 2018)
- win32/GNUmakefile: define HAVE_WINDOWS_H
  
  This macro was only used in test/example code before, now it is
  also used in library code, but only defined automatically by
  automake/cmake, so let's do the same for the standalone win32
  make file.
  
  It'd be probably better to just rely on the built-in _WIN32 macro
  to detect the presence of windows.h though. It's already used
  in most of libssh2 library code. There is a 3rd, similar macro
  named LIBSSH2_WIN32, which might also be replaced with _WIN32.
  
  Ref: https://github.com/libssh2/libssh2/commit/8b870ad771cbd9cd29edbb3dbb0878e950f868ab
  Closes https://github.com/libssh2/libssh2/pull/266

Marc Hoersken (2 Sep 2018)
- Fix conditional check for HAVE_DECL_SECUREZEROMEMORY
  
  "Unlike the other `AC_CHECK_*S' macros, when a symbol is not declared,
  HAVE_DECL_symbol is defined to `0' instead of leaving HAVE_DECL_symbol
  undeclared. When you are sure that the check was performed,
  use HAVE_DECL_symbol in #if."
  
  Source: autoconf documentation for AC_CHECK_DECLS.

- Fix implicit declaration of function 'SecureZeroMemory'
  
  Include window.h in order to use SecureZeroMemory on Windows.

- Fix implicit declaration of function 'free' by including stdlib.h

GitHub (27 Aug 2018)
- [Will Cosgrove brought this change]

  Use malloc abstraction function in pem parse
  
  Fix warning on WinCNG build.

- [Will Cosgrove brought this change]

  Fixed possible junk memory read in sftp_stat #258

- [Will Cosgrove brought this change]

  removed INT64_C define (#260)
  
  No longer used.

- [Will Cosgrove brought this change]

  Added conditional around engine.h include

Will Cosgrove (6 Aug 2018)
- [Alex Crichton brought this change]

  Fix OpenSSL link error with `no-engine` support (#259)
  
  This commit fixes linking against an OpenSSL library that was compiled with
  `no-engine` support by bypassing the initialization routines as they won't be
  available anyway.

GitHub (2 Aug 2018)
- [Will Cosgrove brought this change]

  ED25519 Key Support #39 (#248)
  
  OpenSSH Key and ED25519 support #39
  Added _libssh2_explicit_zero() to explicitly zero sensitive data in memory #120
  
  * ED25519 Key file support - Requires OpenSSL 1.1.1 or later
  * OpenSSH Key format reading support - Supports RSA/DSA/ECDSA/ED25519 types
  * New string buffer reading functions - These add build-in bounds checking and convenance methods. Used for OpenSSL PEM file reading.
  * Added new tests for OpenSSH formatted Keys

- [Will Cosgrove brought this change]

  ECDSA key types are now explicit (#251)
  
  * ECDSA key types are now explicit
  
  Issue was brough up in pull request #248

Will Cosgrove (2 May 2018)
- [Jakob Egger brought this change]

  Add Instructions for building from Master (#249)

GitHub (27 Apr 2018)
- [Will Cosgrove brought this change]

  Initialize sb_intl #226

Will Cosgrove (19 Apr 2018)
- [doublex brought this change]

  buffer overflow (valgrind) (#159)

- [Brendan Shanks brought this change]

  mbedTLS: Remove some C99-style intermingled variable declarations (#196)

GitHub (18 Apr 2018)
- [Will Cosgrove brought this change]

  fix for #160

Will Cosgrove (18 Apr 2018)
- [doublex brought this change]

  fix memory leak when using mbedtls backend (#158)
  
   _libssh2_bn_init_from_bin/_libssh2_bn_free would leak bignum from mbedtls_calloc().

- [Brendan Shanks brought this change]

  mbedTLS: Avoid multiple definition errors for context handles (#197)

- [Tseng Jun brought this change]

  Fix the EVP cipher meth memory leakage problem (#244)
  
  * Fix the EVP cipher meth memory leakage problem
  
  Looks good, thanks for the fixes.

Marc Hörsken (31 Mar 2018)
- [Will Cosgrove brought this change]

  Added ECDSA defines for WinCNG (#245)
  
  Fixed missing defines preventing building using WinCNG

GitHub (30 Mar 2018)
- [Will Cosgrove brought this change]

  Fix for _libssh2_rsa_new with OpenSSL 1.0.x
  
  missing d value assignment.

Will Cosgrove (20 Mar 2018)
- [Etienne Samson brought this change]

  A collection of small fixes (#198)
  
  * tests: Remove if-pyramids
  
  * tests: Switch run_command arguments
  
  * tests: Make run_command a vararg function
  
  * tests: Xcode doesn't obey CMake's test working directory
  
  * openssl: move manual AES-CTR cipher into crypto init
  
  * cmake: Move our include dir before all other include paths

GitHub (15 Mar 2018)
- [Will Cosgrove brought this change]

  Fixes incorrect indexing of KEX prefs string
  
  After stripping out an invalid KEX pref entry, it would incorrectly advance again leaving invalid values in the list.

Viktor Szakats (13 Mar 2018)
- tests: fix checksrc warnings
  
  Also:
  * add 'static' qualifier to file-wide const buffers
  * fix a non-ANSI C89 comment
  * silence a mismatched fprintf() mask warning by adding a cast

- cmake: recognize OpenSSL 1.1 .dll names
  
  Also fix some comment typos and a stray tab.

- docs: update an URL [ci skip]

Daniel Stenberg (12 Mar 2018)
- docs/SECURITY: the max embargo is 14 days now

Viktor Szakats (12 Mar 2018)
- docs: spelling fixes [ci skip]
  
  Closes https://github.com/libssh2/libssh2/pull/222

GitHub (12 Mar 2018)
- [Will Cosgrove brought this change]

  Fixed minor tabs/spacing issues

- [Will Cosgrove brought this change]

  Update kex.c

- [Will Cosgrove brought this change]

  Added basic bounds checking #206
  
  Basic bounds checking in ecdh_sha2_nistp()

- [Will Cosgrove brought this change]

  Fixed Clang warning #206
  
  Fixed possible garbage value for secret in an error case

- [Will Cosgrove brought this change]

  Fixed incorrect #if to #ifdef #206
  
  When checking HAVE_OPAQUE_STRUCTS.

Viktor Szakats (12 Mar 2018)
- src: suppress two checksrc warnings
  
  Ref: https://github.com/libssh2/libssh2/pull/235

- src: address fopen() warnings, add missing copyright headers
  
  Ref: https://github.com/libssh2/libssh2/pull/235

- src: replace sprintf() with snprintf()
  
  Ref: https://github.com/libssh2/libssh2/pull/235

- src: fix checksrc warnings
  
  Use checksrc.pl from the curl project, with (for now)
  suppressed long line warnings and indentation set to
  4 spaces. Fixes are whitespace for the most part.
  
  Warning count went down from 2704 to 12.
  
  Also fix codespell typos, two non-ANSI C89 comments
  and a stray tab in include/libssh2.h.
  
  Ref: https://github.com/libssh2/libssh2/pull/235

- checksrc: add source style checker
  
  This is a slightly extended version of this original source
  from the curl project:
  https://github.com/curl/curl/blob/8b754c430b9a4c51aa606c687ee5014faf7c7b06/lib/checksrc.pl
  
  This version adds the following options to customize it for
  libssh2 (plus some whitespace formatting):
  
  `-i<n>`  to override indentation spaces (2)
  `-m<n>`  to override maximum line length (79)
  
  Command-line used to check libssh2 sources:
  
  $ ./checksrc.pl -i4 -m500 *.c *.h
  
  Closes https://github.com/libssh2/libssh2/pull/236

- src: add static qualifier
  
  To private, const strings.
  
  Closes https://github.com/libssh2/libssh2/pull/237

- [Will Cosgrove brought this change]

  Add support for ECDSA keys and host keys (#41)
  
  This commit lands full ECDSA key support when using the OpenSSL
  backend. Which includes:
  
  New KEX methods:
  ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521
  
  Can now read OpenSSL formatted ECDSA key files.
  
  Now supports known host keys of type ecdsa-sha2-nistp256.
  
  New curve types:
  NID_X9_62_prime256v1, NID_secp384r1, NID_secp521r1
  
  Default host key preferred ordering is now nistp256, nistp384,
  nistp521, rsa, dss.
  
  Ref: https://github.com/libssh2/libssh2/issues/41
  
  Closes https://github.com/libssh2/libssh2/pull/206

GitHub (15 Dec 2017)
- [Will Cosgrove brought this change]

  Fixed possible crash when decoding invalid data
  
  When trying to decode invalid data, it frees the buffer but doesn't nil it so the caller gets a junk memory pointer which they could potentially double free.

- [Will Cosgrove brought this change]

  Remove call to OpenSSL_add_all_ciphers()
  
  Now lives in libssh2 init() from PR #189

- [Will Cosgrove brought this change]

  Fixed incorrect reference to decrypted block
  
  Fixed incorrectly copied memory from p->buf into init instead of from the decrypted buffer block. The only reason this worked was because the crypt() function decrypts the value in-place and overwrites p->buf.  I'm working on a fork that no longer does this and exposed this bug.

Will Cosgrove (20 Oct 2017)
- [Pan brought this change]

  Fix typo in crypt.c (#218)

Kamil Dudka (17 Oct 2017)
- session: avoid printing misleading debug messages
  
  ... while throwing LIBSSH2_ERROR_EAGAIN out of session_startup()
  
  If the session runs in blocking mode, LIBSSH2_ERROR_EAGAIN never reaches
  the libssh2 API boundary and, in non-blocking mode, these messages are
  suppressed by the condition in _libssh2_error_flags() anyway.
  
  Closes #211

Viktor Szakats (15 Oct 2017)
- win32/GNUmakefile: allow customizing dll suffixes
  
  - New `LIBSSH2_DLL_SUFFIX` envvar will add a suffix to the generated
    libssh2 dll name. Useful to add `-x64` to 64-bit builds so that
    it can live in the same directory as the 32-bit one. By default
    this is empty.
  
  - New `LIBSSH2_DLL_A_SUFFIX` envvar to customize the suffix of the
    generated import library (implib) for libssh2 .dll. It defaults
    to `dll`, and it's useful to modify that to `.dll` to have the
    standard naming scheme for mingw-built .dlls, i.e. `libssh2.dll.a`.
  
  Ref: https://github.com/curl/curl/commit/aaa16f80256abc1463fd9374815130a165222257
  
  Closes https://github.com/libssh2/libssh2/pull/215

- makefile.m32: allow to override gcc, ar and ranlib
  
  Allow to ovverride certain build tools, making it possible to
  use LLVM/Clang to build libssh2. The default behavior is unchanged.
  To build with clang (as offered by MSYS2), these settings can
  be used:
  
  LIBSSH2_CC=clang
  LIBSSH2_AR=llvm-ar
  LIBSSH2_RANLIB=llvm-ranlib
  
  Also adjust ranlib parameters to be compatible with LLVM/Clang's
  ranlib tool.
  
  Closes https://github.com/libssh2/libssh2/pull/214

GitHub (27 Sep 2017)
- [Will Cosgrove brought this change]

  Fixes out of bounds memory access (#210)
  
  If an invalid PEM file is read and the lines are longer than 128 characters it will go out of bounds and crash on line 91.

Will Cosgrove (11 Sep 2017)
- [Kamil Dudka brought this change]

  scp: do not NUL-terminate the command for remote exec (#208)
  
  It breaks SCP download/upload from/to certain server implementations.
  
  The bug does not manifest with OpenSSH, which silently drops the NUL
  byte (eventually with any garbage that follows the NUL byte) before
  executing it.
  
  Bug: https://bugzilla.redhat.com/1489736

GitHub (21 Aug 2017)
- [Viktor Szakats brought this change]

  openssl.c: remove no longer used variable (#204)
  
  after e378d2e30a40bd9bcee06dc3a4250f269098e200

- [Will Cosgrove brought this change]

  Fix for #188 (#189)
  
  * Update openssl.c
  
  * Create openssl.h

Will Cosgrove (24 May 2017)
- [Marcel Raad brought this change]

  openssl: fix build with OpenSSL 1.1 API (#176)
  
  When building with OPENSSL_API_COMPAT=0x10100000L, OpenSSL_add_all_algorithms
  and OpenSSL_add_all_ciphers don't exist. The corresponding functionality is
  handled automatically with OpenSSL 1.1.

- [Sune Bredahl brought this change]

  Add support for SHA256 hostkey fingerprints (#180)
  
  Looks good, thanks!

GitHub (12 May 2017)
- [Will Cosgrove brought this change]

  Fix memory leak of crypt_ctx->h using openSSL 1.1+ (#177)
  
  Need to use EVP_CIPHER_CTX_free instead of EVP_CIPHER_CTX_reset.

Marc Hoersken (2 Mar 2017)
- tests/openssh_server/authorized_keys: add key_rsa_encrypted.pub

- tests: add simple test for passphrase-protected PEM file support

- os400qc3: enable passphrase-protected PEM file support using pem.c

- pem: fix indentation and replace assert after 386e012292

- [Keno Fischer brought this change]

  pem: add passphrase-protected PEM file support for libgcrypt and wincng
  
  Since they use our own PEM parser which did not support encrypted
  PEM files, trying to use such files on these backends failed.
  Fix that by augmenting the PEM parser to support encrypted PEM files.

- [Thomas brought this change]

  misc: use time constant implementation for AES CTR increment

- [Thomas brought this change]

  wincng: add AES CTR mode support (aes128-ctr, aes192-ctr, aes256-ctr)

- [Thomas brought this change]

  openssl: move shared AES-CTR code into misc

Daniel Stenberg (20 Dec 2016)
- [Alex Crichton brought this change]

  kex: acknowledge error code from libssh2_dh_key_pair()
  
  Fixes a segfault using ssh-agent on Windows
