[libssh2] #309: latest libssh2 library fails to authenticate with public key (RSA) libssh2_userauth_publickey_fromfile

2015-12-12 Thread libssh2 Trac
#309: latest libssh2 library fails to authenticate with public key (RSA)
libssh2_userauth_publickey_fromfile
-+
 Reporter:  mohisan  |   Owner:
 Type:  defect   |  Status:  new
 Priority:  high |   Milestone:  1.4.3
Component:  API  | Version:  1.5.0
 Keywords:   |  Blocked By:
   Blocks:   |
-+
 libssh2 library was build against MinGW Makefiles and using OpenSSL.
 Target OS Windows 7.
 public/private key pair was generated using OpenSSL, without passphrase.
 I am using freeSSHd Server application, where I set a user "testuser" and
 authentication SSH public key only.

 My Code look like this:


 {{{


 // authenticate by public key.
 int iResult = libssh2_userauth_publickey_fromfile( mySession,
 "testuser", "public.pem", "private.pem", NULL );


 }}}


 '''iResult''' always returns '''LIBSSH2_ERROR_PUBLICKEY_UNVERIFIED'''.
 what am I doing wrong?
 I really can't help myself and I couldn't find out what I am doing wrong.

 By the way '''libssh2_userauth_password''' works fine, but I need public
 key authentication

 Could you please help me.

 Mohi

-- 
Ticket URL: 
libssh2 
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #244: scp_send may transmit not initialised memory

2015-09-12 Thread libssh2 Trac
#244: scp_send may transmit not initialised memory
---+--
  Reporter:  torsten.rupp  |  Owner:  mback2k
  Type:  defect| Status:  closed
  Priority:  normal|  Milestone:
 Component:  SCP   |Version:  1.4.1
Resolution:  fixed |   Keywords:  scp_send
Blocked By:| Blocks:
---+--
Changes (by mback2k):

 * owner:   => mback2k


Comment:

 In [changeset:"b99204f2896b0cdafa3ecc0736f0252ce44c32c7/libssh2"]:
 {{{
 #!CommitTicketReference repository="libssh2"
 revision="b99204f2896b0cdafa3ecc0736f0252ce44c32c7"
 scp.c: fix that scp_send may transmit not initialised memory

 Fixes ticket 244. Thanks Torsten.
 }}}

-- 
Ticket URL: 
libssh2 
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #43: data type for offset in libssh2_sftp_seek

2015-09-12 Thread libssh2 Trac
#43: data type for offset in libssh2_sftp_seek
+
  Reporter:  anonymous  |  Owner:  bagder
  Type:  defect | Status:  closed
  Priority:  normal |  Milestone:
 Component:  API|Version:
Resolution:  fixed  |   Keywords:
+
Changes (by Zenju ):

 * resolution:   => fixed


Comment:

 In [changeset:"3768f8aeef9faa009a2c056beacaa566bd90013e/libssh2"]:
 {{{
 #!CommitTicketReference repository="libssh2"
 revision="3768f8aeef9faa009a2c056beacaa566bd90013e"
 kex: free server host key before allocating it (again)

 Fixes a memory leak when Synology server requests key exchange

 Closes #43
 }}}

-- 
Ticket URL: 
libssh2 
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #168: Memory leak in libssh2_session_startup

2015-09-12 Thread libssh2 Trac
#168: Memory leak in libssh2_session_startup
---+
  Reporter:  jcollins  |  Owner:  ssbssa
  Type:  defect| Status:  closed
  Priority:  normal|  Milestone:
 Component:  API   |Version:  1.2.4
Resolution:  fixed |   Keywords:
Blocked By:| Blocks:
---+
Changes (by ssbssa):

 * owner:   => ssbssa


Comment:

 In [changeset:"09c5e59933daf67b833f34b8c388766abc038483/libssh2"]:
 {{{
 #!CommitTicketReference repository="libssh2"
 revision="09c5e59933daf67b833f34b8c388766abc038483"
 kex: fix libgcrypt memory leaks of bignum

 Fixes #168.
 }}}

-- 
Ticket URL: 
libssh2 
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #36: The correct encoding for true is 1, not 0xff

2015-09-12 Thread libssh2 Trac
#36: The correct encoding for true is 1, not 0xff
-+---
  Reporter:  em1 |  Owner:  Mizunashi Mana 
  Type:  defect  | Status:  closed
  Priority:  normal  |  Milestone:
 Component:  |Version:
Resolution:  fixed   |   Keywords:
-+---
Changes (by Mizunashi Mana ):

 * owner:   => Mizunashi Mana 
 * resolution:   => fixed


Comment:

 In [changeset:"f4b5947d6d29f263f21fe462a86eb71108cda70d/libssh2"]:
 {{{
 #!CommitTicketReference repository="libssh2"
 revision="f4b5947d6d29f263f21fe462a86eb71108cda70d"
 openssl.h: adjust the rsa/dsa includes

 ... to work when built without DSA support.

 Closes #36
 }}}

-- 
Ticket URL: 
libssh2 
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #290: segfault in diffie_hellman_sha1

2015-09-12 Thread libssh2 Trac
#290: segfault in diffie_hellman_sha1
-+-
  Reporter:  mstrsn  |  Owner:  mback2k
  Type:  defect  | Status:  closed
  Priority:  normal  |  Milestone:
 Component:  crypto  |Version:  1.4.2
Resolution:  fixed   |   Keywords:
Blocked By:  | Blocks:
-+-
Changes (by mback2k):

 * owner:   => mback2k


Comment:

 In [changeset:"7ca44fbd9467abbe1f54be34f94069c561ded397/libssh2"]:
 {{{
 #!CommitTicketReference repository="libssh2"
 revision="7ca44fbd9467abbe1f54be34f94069c561ded397"
 kex: do not ignore failure of libssh2_sha1_init()

 Based upon 43b730ce56f010e9d33573fcb020df49798c1ed8.
 Fixes ticket 290. Thanks for the suggestion, mstrsn.
 }}}

-- 
Ticket URL: 
libssh2 
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #32: showmask not initialized

2015-09-12 Thread libssh2 Trac
#32: showmask not initialized
-+
  Reporter:  em1 |  Owner:  nasacj 
  Type:  defect  | Status:  closed
  Priority:  normal  |  Milestone:
 Component:  |Version:
Resolution:  fixed   |   Keywords:
-+
Changes (by nasacj ):

 * owner:   => nasacj 
 * resolution:   => fixed


Comment:

 In [changeset:"9af7eb48dc3854ce8ee0589f7e2beb944e064847/libssh2"]:
 {{{
 #!CommitTicketReference repository="libssh2"
 revision="9af7eb48dc3854ce8ee0589f7e2beb944e064847"
 hostkey.c: Fix compiling error when OPENSSL_NO_MD5 is defined

 Closes #32
 }}}

-- 
Ticket URL: 
libssh2 
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #23: config param mismatch in documentation/implementation

2015-09-12 Thread libssh2 Trac
#23: config param mismatch in documentation/implementation
+-
  Reporter:  anonymous  |  Owner:  Viktor Szakats 
  Type:  defect | Status:  closed
  Priority:  normal |  Milestone:
 Component: |Version:
Resolution:  fixed  |   Keywords:
+-
Changes (by Viktor Szakats ):

 * owner:   => Viktor Szakats 
 * resolution:   => fixed


Comment:

 In [changeset:"3acca4ad15b677cce4b9cbdf8e78b0d20193b2ff/libssh2"]:
 {{{
 #!CommitTicketReference repository="libssh2"
 revision="3acca4ad15b677cce4b9cbdf8e78b0d20193b2ff"
 GNUmakefile: up OpenSSL version

 closes #23
 }}}

-- 
Ticket URL: 
libssh2 
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #300: Memory leak in kex.c

2015-09-11 Thread libssh2 Trac
#300: Memory leak in kex.c
---+-
  Reporter:  ElectronShepherd  |  Owner:
  Type:  defect| Status:  new
  Priority:  normal|  Milestone:  1.5.0
 Component:  crypto|Version:  1.5.0
Resolution:|   Keywords:  memory leak
Blocked By:| Blocks:
---+-

Comment (by dangor2):

 I can confirm this leak. Happens with a Synology Server during
 libssh2_sftp_init when diffie_hellman_sha1() is called a second time
 (first call to diffie_hellman_sha1 happens during
 libssh2_session_handshake)

-- 
Ticket URL: 
libssh2 
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #291: libssh2_agent_connect always returns -39 when using in on iOS

2015-08-11 Thread libssh2 Trac
#291: libssh2_agent_connect always returns -39 when using in on iOS
-+---
  Reporter:  ali312  |  Owner:
  Type:  defect  | Status:  new
  Priority:  normal  |  Milestone:  1.4.3
 Component:  API |Version:  1.4.2
Resolution:  |   Keywords:
Blocked By:  | Blocks:
-+---

Comment (by Eschaton):

 See my comment: You cannot run a daemon or agent on iOS, therefore
 attempting to use an SSH agent on iOS will fail.

-- 
Ticket URL: https://trac.libssh2.org/ticket/291#comment:3
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #291: libssh2_agent_connect always returns -39 when using in on iOS

2015-08-11 Thread libssh2 Trac
#291: libssh2_agent_connect always returns -39 when using in on iOS
-+---
  Reporter:  ali312  |  Owner:
  Type:  defect  | Status:  new
  Priority:  normal  |  Milestone:  1.4.3
 Component:  API |Version:  1.4.2
Resolution:  |   Keywords:
Blocked By:  | Blocks:
-+---

Comment (by ios3):

 Facing same issue.
 Does that means Should we try to connect agent once successfully connect
 with the client? Can any one suggest please the correct flow how it should
 be work?

-- 
Ticket URL: https://trac.libssh2.org/ticket/291#comment:2
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #303: CMake build system can't be used as a subproject

2015-07-26 Thread libssh2 Trac
#303: CMake build system can't be used as a subproject
--+
  Reporter:  JasonHaslam  |  Owner:
  Type:  defect   | Status:  closed
  Priority:  normal   |  Milestone:
 Component:  misc |Version:  1.5.0
Resolution:  fixed|   Keywords:
Blocked By:   | Blocks:
--+
Changes (by alamaison):

 * status:  new = closed
 * resolution:   = fixed


Comment:

 Sorry, this slipped my mind.  I've applied your patch now.

-- 
Ticket URL: https://trac.libssh2.org/ticket/303#comment:4
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #295: latest libssh2 library with support 64 bit architecture fails to authenticate with public key (RSA) libssh2_userauth_publickey_fromfile

2015-06-10 Thread libssh2 Trac
#295: latest libssh2 library with support 64 bit architecture fails to
authenticate with public key (RSA)  libssh2_userauth_publickey_fromfile
-+---
  Reporter:  ios3|  Owner:
  Type:  defect  | Status:  new
  Priority:  normal  |  Milestone:  1.4.3
 Component:  API |Version:  1.4.2
Resolution:  |   Keywords:
Blocked By:  | Blocks:
-+---

Comment (by ios3):

 Hey, Thanks for the reply, I just checked for that and seeing something
 like below in libssh2.h file

 /* NOTE NOTE NOTE
  libssh2_trace() has no function in builds that aren't built with
 debug
  enabled
  */
 LIBSSH2_API int libssh2_trace(LIBSSH2_SESSION *session, int bitmask);

 I am not sure from where can I enable trace, Can you please guide me on
 that so I can make it enable and recompile lib.

 Thanks

-- 
Ticket URL: https://trac.libssh2.org/ticket/295#comment:7
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #295: latest libssh2 library with support 64 bit architecture fails to authenticate with public key (RSA) libssh2_userauth_publickey_fromfile

2015-06-10 Thread libssh2 Trac
#295: latest libssh2 library with support 64 bit architecture fails to
authenticate with public key (RSA)  libssh2_userauth_publickey_fromfile
-+---
  Reporter:  ios3|  Owner:
  Type:  defect  | Status:  new
  Priority:  normal  |  Milestone:  1.4.3
 Component:  API |Version:  1.4.2
Resolution:  |   Keywords:
Blocked By:  | Blocks:
-+---

Comment (by alamaison):

 If you configured libssh2 using CMake, set ENABLE_DEBUG_LOGGING=ON.  For
 Autotools, pass the option --enable-debug=yes to ./configure.

-- 
Ticket URL: https://trac.libssh2.org/ticket/295#comment:8
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #295: latest libssh2 library with support 64 bit architecture fails to authenticate with public key (RSA) libssh2_userauth_publickey_fromfile

2015-06-09 Thread libssh2 Trac
#295: latest libssh2 library with support 64 bit architecture fails to
authenticate with public key (RSA)  libssh2_userauth_publickey_fromfile
-+---
  Reporter:  ios3|  Owner:
  Type:  defect  | Status:  new
  Priority:  normal  |  Milestone:  1.4.3
 Component:  API |Version:  1.4.2
Resolution:  |   Keywords:
Blocked By:  | Blocks:
-+---

Comment (by alamaison):

 We will need to see the debug log to diagnose your problem.  You can get
 this by calling libssh2_trace(~0).  You may need to recompile libssh2 with
 debugging enabled.

-- 
Ticket URL: https://trac.libssh2.org/ticket/295#comment:6
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #295: latest libssh2 library with support 64 bit architecture fails to authenticate with public key (RSA) libssh2_userauth_publickey_fromfile

2015-06-09 Thread libssh2 Trac
#295: latest libssh2 library with support 64 bit architecture fails to
authenticate with public key (RSA)  libssh2_userauth_publickey_fromfile
-+---
  Reporter:  ios3|  Owner:
  Type:  defect  | Status:  new
  Priority:  normal  |  Milestone:  1.4.3
 Component:  API |Version:  1.4.2
Resolution:  |   Keywords:
Blocked By:  | Blocks:
-+---

Comment (by ios3):

 hey, please any one reply for this.. Now I unable to submit my app until
 it support 64 bit and I am getting issue of 64 bit as described above..
 please reply.

-- 
Ticket URL: https://trac.libssh2.org/ticket/295#comment:5
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #305: Unable to exchange encryption keys

2015-06-01 Thread libssh2 Trac
#305: Unable to exchange encryption keys
--+-
  Reporter:  rikkman  |  Owner:
  Type:  defect   | Status:  new
  Priority:  normal   |  Milestone:
 Component:  crypto   |Version:
Resolution:   |   Keywords:
Blocked By:   | Blocks:
--+-

Comment (by rikkman):

 How do I setup debugging?

-- 
Ticket URL: https://trac.libssh2.org/ticket/305#comment:6
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


[libssh2] #306: Overlapping memcpy in libssh2_session_method_pref

2015-06-01 Thread libssh2 Trac
#306: Overlapping memcpy in libssh2_session_method_pref
---+
 Reporter:  omoerbeek  |   Owner:
 Type:  defect |  Status:  new
 Priority:  normal |   Milestone:  1.4.3
Component:  API| Version:  1.4.2
 Keywords: |  Blocked By:
   Blocks: |
---+
 For memcpy, having overlapping src and dest means undefined behaviour.

 In libssh2_session_method_pref() the memcpy in the while loop is obviously
 overlapping.

 Replace by memmove to fix.

 Found by OpenBSD strict memcpy.

 Regards, Otto Moerbeek

-- 
Ticket URL: https://trac.libssh2.org/ticket/306
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #305: Unable to exchange encryption keys

2015-06-01 Thread libssh2 Trac
#305: Unable to exchange encryption keys
--+-
  Reporter:  rikkman  |  Owner:
  Type:  defect   | Status:  new
  Priority:  normal   |  Milestone:
 Component:  crypto   |Version:
Resolution:   |   Keywords:
Blocked By:   | Blocks:
--+-

Comment (by alamaison):

 I'm not sure how it's done via the PHP binding.  For libssh2 itself, you
 call libssh2_trace with a bitmask set to the kinds of debugging you are
 interested in.  To get everything, call libssh2_trace(~0).

 You may have to recompile libssh2 with debugging enabled:
 ENABLE_DEBUG_LOGGING=ON for CMake, --enable-debug=yes for Autotools.

-- 
Ticket URL: https://trac.libssh2.org/ticket/305#comment:7
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #305: Unable to exchange encryption keys

2015-05-31 Thread libssh2 Trac
#305: Unable to exchange encryption keys
--+-
  Reporter:  rikkman  |  Owner:
  Type:  defect   | Status:  new
  Priority:  normal   |  Milestone:
 Component:  crypto   |Version:
Resolution:   |   Keywords:
Blocked By:   | Blocks:
--+-

Comment (by alamaison):

 We need the libssh2 debug logs to have any hope of diagnosing the problem

-- 
Ticket URL: https://trac.libssh2.org/ticket/305#comment:5
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #305: Unable to exchange encryption keys

2015-05-31 Thread libssh2 Trac
#305: Unable to exchange encryption keys
--+-
  Reporter:  rikkman  |  Owner:
  Type:  defect   | Status:  new
  Priority:  normal   |  Milestone:
 Component:  crypto   |Version:
Resolution:   |   Keywords:
Blocked By:   | Blocks:
--+-

Comment (by rikkman):

 When I do a Putty connection on the bad router and on the good router
 I get the same log output wich is:
 2015-05-27 12:02:19 Server version: SSH-2.0-HUAWEI-1.5
 2015-05-27 12:02:19 Using SSH protocol version 2
 2015-05-27 12:02:19 We claim version: SSH-2.0-PuTTY_Release_0.63
 2015-05-27 12:02:19 Doing Diffie-Hellman group exchange
 2015-05-27 12:02:19 Doing Diffie-Hellman key exchange with hash SHA-1
 2015-05-27 12:02:32 Host key fingerprint is:
 2015-05-27 12:02:32 ssh-rsa 512
 8a:07:9a:28:1d:4d:22:4c:18:35:4f:18:eb:ba:9e:b3
 2015-05-27 12:02:32 Initialised AES-128 CBC client-server encryption
 2015-05-27 12:02:32 Initialised HMAC-SHA1 client-server MAC algorithm
 2015-05-27 12:02:32 Initialised AES-128 CBC server-client encryption
 2015-05-27 12:02:32 Initialised HMAC-SHA1 server-client MAC algorithm

-- 
Ticket URL: https://trac.libssh2.org/ticket/305#comment:4
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


[libssh2] #305: Unable to exchange encryption keys

2015-05-29 Thread libssh2 Trac
#305: Unable to exchange encryption keys
-+--
 Reporter:  rikkman  |   Owner:
 Type:  defect   |  Status:  new
 Priority:  normal   |   Milestone:
Component:  crypto   | Version:
 Keywords:   |  Blocked By:
   Blocks:   |
-+--
 Hi! I'm doing some coding with libssh2 v0.12 on windows 7 Pro 64 bits to
 connect to Huawei routers. On some routers works fine, on others just echo
 this error: Warning: ssh2_connect(): Error startingup SSH connection(-8):
 Unable to exchange encryption keys in (...). I used putty on same routers
 and the sessions logs are identical:
 2015-05-27 12:02:19 Server version: SSH-2.0-HUAWEI-1.5
 2015-05-27 12:02:19 Using SSH protocol version 2
 2015-05-27 12:02:19 We claim version: SSH-2.0-PuTTY_Release_0.63
 2015-05-27 12:02:19 Doing Diffie-Hellman group exchange
 2015-05-27 12:02:19 Doing Diffie-Hellman key exchange with hash SHA-1
 2015-05-27 12:02:32 Host key fingerprint is:
 2015-05-27 12:02:32 ssh-rsa 512
 8a:07:9a:28:1d:4d:22:4c:18:35:4f:18:eb:ba:9e:b3
 2015-05-27 12:02:32 Initialised AES-128 CBC client-server encryption
 2015-05-27 12:02:32 Initialised HMAC-SHA1 client-server MAC algorithm
 2015-05-27 12:02:32 Initialised AES-128 CBC server-client encryption
 2015-05-27 12:02:32 Initialised HMAC-SHA1 server-client MAC algorithm

 Can you help me?
 Thanks!

-- 
Ticket URL: https://trac.libssh2.org/ticket/305
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #305: Unable to exchange encryption keys

2015-05-29 Thread libssh2 Trac
#305: Unable to exchange encryption keys
--+-
  Reporter:  rikkman  |  Owner:
  Type:  defect   | Status:  new
  Priority:  normal   |  Milestone:
 Component:  crypto   |Version:
Resolution:   |   Keywords:
Blocked By:   | Blocks:
--+-

Comment (by alamaison):

 Do you really mean v0.12?  That's 10 years old!  If so, the only sensible
 suggestion is upgrade.

-- 
Ticket URL: https://trac.libssh2.org/ticket/305#comment:1
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #305: Unable to exchange encryption keys

2015-05-29 Thread libssh2 Trac
#305: Unable to exchange encryption keys
--+-
  Reporter:  rikkman  |  Owner:
  Type:  defect   | Status:  new
  Priority:  normal   |  Milestone:
 Component:  crypto   |Version:
Resolution:   |   Keywords:
Blocked By:   | Blocks:
--+-

Comment (by rikkman):

 Replying to [comment:1 alamaison]:
  Do you really mean v0.12?  That's 10 years old!  If so, the only
 sensible suggestion is upgrade.

 yes, it's the only one available for windows
 from this address
 http://windows.php.net/downloads/pecl/releases/ssh2/0.12/

-- 
Ticket URL: https://trac.libssh2.org/ticket/305#comment:2
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #305: Unable to exchange encryption keys

2015-05-29 Thread libssh2 Trac
#305: Unable to exchange encryption keys
--+-
  Reporter:  rikkman  |  Owner:
  Type:  defect   | Status:  new
  Priority:  normal   |  Milestone:
 Component:  crypto   |Version:
Resolution:   |   Keywords:
Blocked By:   | Blocks:
--+-

Comment (by alamaison):

 That's the version of the PHP library that uses libssh2 under the bonnet.
 It looks like it's using libssh2 v1.4.2, which is no too bad.

 Unfortunately, we don't have enough information to go on.  Are you able to
 configure PHP's ssh2 to spit out the debug log from libssh2?

 And when you say the sessions logs are identical, which logs are
 identical to which?

-- 
Ticket URL: https://trac.libssh2.org/ticket/305#comment:3
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #304: Improperly linking to system libssl libcrypto when staged one is desired

2015-05-23 Thread libssh2 Trac
#304: Improperly linking to system libssl  libcrypto when staged one is desired
+---
  Reporter:  kotoroshinoto  |  Owner:
  Type:  defect | Status:  new
  Priority:  normal |  Milestone:  1.5.0
 Component:  crypto |Version:  1.5.0
Resolution: |   Keywords:
Blocked By: | Blocks:
+---

Comment (by kotoroshinoto):

 giving the path to the libs with -L/not/usr/path/lib in LDFLAGS seems to
 sidestep the problem. I did however set the requisite paths in the various
 env variables, so it OUGHT to have been using that path anyway.

 That soname DOES exist (the one with .10) but it is NOT the correct one to
 be using, and it should certainly not be the one it finds first.

-- 
Ticket URL: https://trac.libssh2.org/ticket/304#comment:4
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #304: Improperly linking to system libssl libcrypto when staged one is desired

2015-05-23 Thread libssh2 Trac
#304: Improperly linking to system libssl  libcrypto when staged one is desired
+---
  Reporter:  kotoroshinoto  |  Owner:
  Type:  defect | Status:  new
  Priority:  normal |  Milestone:  1.5.0
 Component:  crypto |Version:  1.5.0
Resolution: |   Keywords:
Blocked By: | Blocks:
+---

Comment (by danf):

 Applications are linked against the SONAME of the shared library, which
 looks to be libssl.so.10 in this case. If you have no file of that name,
 then there's no way for the run-time linker to find your library, so it
 continues along the search path and links against the one it *can*
 find—the system version.

-- 
Ticket URL: https://trac.libssh2.org/ticket/304#comment:3
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #303: CMake build system can't be used as a subproject

2015-05-21 Thread libssh2 Trac
#303: CMake build system can't be used as a subproject
--+---
  Reporter:  JasonHaslam  |  Owner:
  Type:  defect   | Status:  new
  Priority:  normal   |  Milestone:
 Component:  misc |Version:  1.5.0
Resolution:   |   Keywords:
Blocked By:   | Blocks:
--+---

Comment (by alamaison):

 The important thing with ExternalProject is that you can't just use it in
 your project's CMakeLists.txt because it doesn't fetch and build the
 subprojects until main project build time - too late for find_package,
 which runs at configure time, to pick them up. You have to make a wrapper
 project that uses ExternalProject to build the dependencies and also uses
 ExternalProject to build your project. This setup is called a CMake
 Superbuild or superproject.

 Hunter avoids the need for a superbuild but building the dependency
 projects at main project configure time.

 Thanks for the patch. I'll try and test it tonight

-- 
Ticket URL: https://trac.libssh2.org/ticket/303#comment:3
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #304: Improperly linking to system libssl libcrypto when staged one is desired

2015-05-21 Thread libssh2 Trac
#304: Improperly linking to system libssl  libcrypto when staged one is desired
+---
  Reporter:  kotoroshinoto  |  Owner:
  Type:  defect | Status:  new
  Priority:  normal |  Milestone:  1.5.0
 Component:  crypto |Version:  1.5.0
Resolution: |   Keywords:
Blocked By: | Blocks:
+---

Comment (by danf):

 Your libssh2 library may have been linked to your special libssl at
 compile time, but it's not finding it at run-time. On Linux, you can use
 the LD_LIBRARY_PATH environment variable or /etc/ld.so.conf config file to
 point to the correct library location at run-time. Or, you can use the
 -rpath command-line option on the linker to hard-code that path into the
 library at compile time.

-- 
Ticket URL: https://trac.libssh2.org/ticket/304#comment:1
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #304: Improperly linking to system libssl libcrypto when staged one is desired

2015-05-21 Thread libssh2 Trac
#304: Improperly linking to system libssl  libcrypto when staged one is desired
+---
  Reporter:  kotoroshinoto  |  Owner:
  Type:  defect | Status:  new
  Priority:  normal |  Milestone:  1.5.0
 Component:  crypto |Version:  1.5.0
Resolution: |   Keywords:
Blocked By: | Blocks:
+---

Comment (by kotoroshinoto):

 output of command: echo $LD_LIBRARY_PATH | tr : \\n

 /UCHC/HPC/Gooch/biotoolmodules/git/2.4.1/lib64
 /UCHC/HPC/Gooch/biotoolmodules/curl/7.42.1/lib
 /UCHC/HPC/Gooch/biotoolmodules/libssh2/1.5.0/lib
 /UCHC/HPC/Gooch/biotoolmodules/openssl/1.0.2a/lib
 /UCHC/HPC/Gooch/biotoolmodules/libmetalink/0.1.2/lib
 /UCHC/HPC/Gooch/biotoolmodules/libIDN/1.30/lib
 /UCHC/HPC/Gooch/biotoolmodules/c-ares/1.10.0/lib
 /UCHC/HPC/Gooch/biotoolmodules/R/3.2.0/lib64
 /UCHC/HPC/Gooch/biotoolmodules/readline/6.3/lib
 /UCHC/HPC/Gooch/biotoolmodules/glib2/2.44.0/lib
 /UCHC/HPC/Gooch/biotoolmodules/python3/3.4.3/lib
 /UCHC/HPC/Gooch/biotoolmodules/python2/2.7.9/lib
 /UCHC/HPC/Gooch/biotoolmodules/pixman/0.32.6/lib
 /UCHC/HPC/Gooch/biotoolmodules/libtiff/4.0.3/lib
 /UCHC/HPC/Gooch/biotoolmodules/libsigc++/2.4.1/lib
 /UCHC/HPC/Gooch/biotoolmodules/libpng/1.6.17/lib
 /UCHC/HPC/Gooch/biotoolmodules/libjpeg/9a/lib
 /UCHC/HPC/Gooch/biotoolmodules/cairo/1.14.2/lib
 /UCHC/HPC/Gooch/biotoolmodules/lapack/3.5.0/lib
 /UCHC/HPC/Gooch/biotoolmodules/gawk/4.1.2/lib
 /UCHC/HPC/Gooch/biotoolmodules/oraclejava/jdk1.8.0_45/lib
 /UCHC/HPC/Gooch/biotoolmodules/libmpdec/2.4.1/lib
 /UCHC/HPC/Gooch/biotoolmodules/tk/8.6.4/lib
 /UCHC/HPC/Gooch/biotoolmodules/tcl/8.6.4/lib
 /UCHC/HPC/Gooch/biotoolmodules/perl/5.20.2/lib
 /UCHC/HPC/Gooch/biotoolmodules/libffi/3.2.1/lib64
 /UCHC/HPC/Gooch/biotoolmodules/libffi/3.2.1/lib
 /UCHC/HPC/Gooch/biotoolmodules/libexpat/2.1.0/lib
 /UCHC/HPC/Gooch/biotoolmodules/ncurses/5.9/lib
 /UCHC/HPC/Gooch/biotoolmodules/mpc/1.0.3/lib
 /UCHC/HPC/Gooch/biotoolmodules/isl/0.14.1/lib
 /UCHC/HPC/Gooch/biotoolmodules/gcc/5.1.0/lib64
 /UCHC/HPC/Gooch/biotoolmodules/gcc/5.1.0/lib
 /UCHC/HPC/Gooch/biotoolmodules/cloog/0.18.3/lib
 /UCHC/HPC/Gooch/biotoolmodules/mpfr/3.1.2/lib
 /UCHC/HPC/Gooch/biotoolmodules/libtool/2.4.6/lib
 /UCHC/HPC/Gooch/biotoolmodules/gmp/6.0.0/lib
 /UCHC/HPC/Gooch/biotoolmodules/flex/2.5.39/lib
 /UCHC/HPC/Gooch/biotoolmodules/binutils/2.25/lib
 /opt/gridengine/lib/lx26-amd64
 /opt/cuda/lib64


 note the presence of /UCHC/HPC/Gooch/biotoolmodules/openssl/1.0.2a/lib

 the library is available at runtime, there is also a key different in the
 filenames of the *.so files

 in my location: the lib directory contains:
 engines  libcrypto.a  libcrypto.so  libcrypto.so.1.0.0  libssl.a
 libssl.so  libssl.so.1.0.0  pkgconfig

 output of locate libssl
 /usr/lib64/.libssl.so.1.0.1e.hmac
 /usr/lib64/.libssl.so.10.hmac
 /usr/lib64/libssl.so
 /usr/lib64/libssl.so.1.0.1e
 /usr/lib64/libssl.so.10
 /usr/lib64/libssl3.so
 /usr/lib64/pkgconfig/libssl.pc

 and output of locate libcrypto
 /usr/lib64/.libcrypto.so.1.0.1e.hmac
 /usr/lib64/.libcrypto.so.10.hmac
 /usr/lib64/libcrypto.so
 /usr/lib64/libcrypto.so.1.0.1e
 /usr/lib64/libcrypto.so.10
 /usr/lib64/pkgconfig/libcrypto.pc


 the program appears to be linking against libcrypto.so.10 and remembering
 that it is using libcrypto.so.10 OR somehow loading that one at runtime
 instead of the one earlier on the path. (it seems to be specifically
 looking for the library with a .10 in its name)

-- 
Ticket URL: https://trac.libssh2.org/ticket/304#comment:2
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


[libssh2] #303: CMake build system can't be used as a subproject

2015-05-21 Thread libssh2 Trac
#303: CMake build system can't be used as a subproject
-+
 Reporter:  JasonHaslam  |   Owner:
 Type:  defect   |  Status:  new
 Priority:  normal   |   Milestone:
Component:  misc | Version:  1.5.0
 Keywords:   |  Blocked By:
   Blocks:   |
-+
 I'm trying to incorporate the new libssh2 cmake build into my own cmake
 build system with the add_subdirectory command. It mostly works except for
 a few places in src/CMakeLists.txt that use CMAKE_SOURCE_DIR. That
 variable points to the top-level project source dir. I'd recommend
 changing them to PROJECT_SOURCE_DIR or libssh2_SOURCE_DIR. When I make
 that change everything works fine for my use case.

-- 
Ticket URL: https://trac.libssh2.org/ticket/303
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #303: CMake build system can't be used as a subproject

2015-05-21 Thread libssh2 Trac
#303: CMake build system can't be used as a subproject
--+---
  Reporter:  JasonHaslam  |  Owner:
  Type:  defect   | Status:  new
  Priority:  normal   |  Milestone:
 Component:  misc |Version:  1.5.0
Resolution:   |   Keywords:
Blocked By:   | Blocks:
--+---

Comment (by alamaison):

 Incorporating a project dependency by adding it as a subdirectory is a
 hack.  A commonly-used hack, admittedly, but still not a great idea.
 CMake provides better mechanisms such as ExternalProject with a
 superproject build.  Or you can use one of the package-managers available
 for CMake (I love [https://github.com/ruslo/hunter Hunter]).

 If you provide a patch that does what you're after, without making the
 CMake files more complex, I see no problem with applying it.  But I can't
 promise a future change won't break it.

-- 
Ticket URL: https://trac.libssh2.org/ticket/303#comment:1
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


[libssh2] #304: Improperly linking to system libssl libcrypto when staged one is desired

2015-05-21 Thread libssh2 Trac
#304: Improperly linking to system libssl  libcrypto when staged one is desired
---+
 Reporter:  kotoroshinoto  |   Owner:
 Type:  defect |  Status:  new
 Priority:  normal |   Milestone:  1.5.0
Component:  crypto | Version:  1.5.0
 Keywords: |  Blocked By:
   Blocks: |
---+
 no matter what I do, it ends up linking to the system files:
 libssl.so.10 = /usr/lib64/libssl.so.10 (0x7f83a6248000)
 libcrypto.so.10 = /usr/lib64/libcrypto.so.10 (0x7f83a5e68000)

 it should be linking to the ones in
 ls /UCHC/HPC/Gooch/biotoolmodules/openssl/1.0.2a/lib/
 engines libcrypto.a libcrypto.so libcrypto.so.1.0.0 libssl.a libssl.so
 libssl.so.1.0.0 pkgconfig

 what do I need to tell the configure script to accomplish this?

-- 
Ticket URL: https://trac.libssh2.org/ticket/304
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #303: CMake build system can't be used as a subproject

2015-05-21 Thread libssh2 Trac
#303: CMake build system can't be used as a subproject
--+---
  Reporter:  JasonHaslam  |  Owner:
  Type:  defect   | Status:  new
  Priority:  normal   |  Milestone:
 Component:  misc |Version:  1.5.0
Resolution:   |   Keywords:
Blocked By:   | Blocks:
--+---

Comment (by JasonHaslam):

 I haven't looked closely at ExternalProject. Maybe I should. I attached a
 trivial patch that works for me. Thanks!

-- 
Ticket URL: https://trac.libssh2.org/ticket/303#comment:2
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


[libssh2] #302: libssh2_session_handshake bug?

2015-04-14 Thread libssh2 Trac
#302: libssh2_session_handshake bug?
+
 Reporter:  5m0k3   |   Owner:
 Type:  defect  |  Status:  new
 Priority:  normal  |   Milestone:  1.5.0
Component:  crypto  | Version:  1.5.0
 Keywords:  |  Blocked By:
   Blocks:  |
+
 Hello, I was working on a password auditing tool using libssh2 and
 encountered the following issue when using with pthread.

 GDB output:

 [Thread debugging using libthread_db enabled]
 Using host libthread_db library /lib/x86_64-linux-gnu/libthread_db.so.1.
 Core was generated by `./dm domains.txt user pass 500'.
 Program terminated with signal SIGSEGV, Segmentation fault.
 #0  0x7ff0eaa3bbdc in ?? () from /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0
 (gdb) bt
 #0  0x7ff0eaa3bbdc in ?? () from /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0
 #1  0xca62c1d6ca62c1d6 in ?? ()
 #2  0xca62c1d6ca62c1d6 in ?? ()
 #3  0xca62c1d6ca62c1d6 in ?? ()
 #4  0xca62c1d6ca62c1d6 in ?? ()
 #5  0xca62c1d6ca62c1d6 in ?? ()
 #6  0xca62c1d6ca62c1d6 in ?? ()
 #7  0xca62c1d6ca62c1d6 in ?? ()
 #8  0xca62c1d6ca62c1d6 in ?? ()
 #9  0x7ff0eada8810 in ?? () from /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0
 #10 0x7feeb000e400 in ?? ()
 #11 0x000f in ?? ()
 #12 0x7ff0eaa3811f in SHA1_Update () from /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0
 #13 0x7ff0eaab76ef in ?? () from /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0
 #14 0x7ff0eaa6d72c in ?? () from /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0
 #15 0x7ff0eb399f8a in diffie_hellman_sha1 () from
 /usr/lib/libssh2.so.1
 #16 0x7ff0eb39c197 in
 kex_method_diffie_hellman_group14_sha1_key_exchange () from
 /usr/lib/libssh2.so.1
 #17 0x7ff0eb39e1ad in _libssh2_kex_exchange () from
 /usr/lib/libssh2.so.1
 #18 0x7ff0eb3a6c6e in session_startup () from /usr/lib/libssh2.so.1
 #19 0x7ff0eb3a6efd in libssh2_session_handshake () from
 /usr/lib/libssh2.so.1
 #20 0x00402023 in verhost (hostname=0x25f1700 be-still.info,
 username=0x2560400 be-still, password=0x25c1590 be-still) at dm.c:248
 #21 0x004021e2 in worker_thread (worker=0x1f2) at dm.c:287
 #22 0x7ff0eb179182 in start_thread (arg=0x7fefb2fc1700) at
 pthread_create.c:312
 #23 0x7ff0eaea647d in clone () at
 ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
 (gdb) frame 20
 #20 0x00402023 in verhost (hostname=0x25f1700 be-still.info,
 username=0x2560400 be-still, password=0x25c1590 be-still) at dm.c:248
 248 rc = libssh2_session_handshake(session, sockfd);
 (gdb)


 Here is the code for function causing problems:

 static int verhost(char *hostname, char *username, char *password) {
 if(hostname == NULL) return -1;
 if(username == NULL) return -1;

 int sockfd, rc;
 long arg;

 struct addrinfo hints, *res;
 int errcode;

 memset (hints, 0, sizeof (hints));
 hints.ai_family = PF_UNSPEC;
 hints.ai_socktype = SOCK_STREAM;
 hints.ai_flags |= AI_CANONNAME;

 errcode = getaddrinfo (hostname, 22, hints, res);
 if (errcode != 0) return -1;

 sockfd = socket(AF_INET, SOCK_STREAM, 0);

 arg = fcntl(sockfd, F_GETFL, NULL);
 arg |= O_NONBLOCK;
 fcntl(sockfd, F_SETFL, arg);

 if (sockfd  0) goto shutend;

 if (connect(sockfd, res-ai_addr, res-ai_addrlen)  0) {
 if (errno == EINPROGRESS) {
 fd_set write_fds;
 memset(write_fds, 0, sizeof(write_fds));
 FD_ZERO(write_fds);
 FD_SET(sockfd, write_fds);
 struct timeval tv;
 int valopt;
 tv.tv_sec = 5;
 tv.tv_usec = 0;
 if (select(sockfd+1, NULL, write_fds, NULL, tv)
  0) {
 socklen_t lon;
 lon = sizeof(int);
 getsockopt(sockfd, SOL_SOCKET, SO_ERROR,
 (void*)(valopt), lon);
 if (valopt) goto shutend;
 }
 else goto shutend;
 }
 else goto shutend;
 }

 LIBSSH2_SESSION *session = libssh2_session_init();
 if(!session) goto shutend;

 libssh2_session_set_timeout(session, 1);
 if(libssh2_session_get_timeout(session)  1) goto shutnow;

 rc = libssh2_session_handshake(session, sockfd);
 if (rc) goto shutnow;

 rc = libssh2_userauth_password(session, username, password);
 if (rc) printf([!] Weak Login: %s - %s/%s\n, hostname, username,
 password);
 else libssh2_session_disconnect(session, Normal Shutdown);

 shutnow:
 libssh2_session_free(session);

 shutend:
 close(sockfd);
 freeaddrinfo(res);
 return -1;
 }

 Let 

Re: [libssh2] #168: Memory leak in libssh2_session_startup

2015-04-03 Thread libssh2 Trac
#168: Memory leak in libssh2_session_startup
---+---
  Reporter:  jcollins  |  Owner:
  Type:  defect| Status:  new
  Priority:  normal|  Milestone:
 Component:  API   |Version:  1.2.4
Resolution:|   Keywords:
Blocked By:| Blocks:
---+---

Comment (by ssbssa):

 Like this, or did you mean more?

-- 
Ticket URL: https://trac.libssh2.org/ticket/168#comment:4
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


[libssh2] #300: Memory leak in kex.c

2015-04-03 Thread libssh2 Trac
#300: Memory leak in kex.c
--+
 Reporter:  ElectronShepherd  |   Owner:
 Type:  defect|  Status:  new
 Priority:  normal|   Milestone:  1.5.0
Component:  crypto| Version:  1.5.0
 Keywords:  memory leak   |  Blocked By:
   Blocks:|
--+
 I'm picking up a memory leak in kex.c, line 205. The code is:

 {{{
 session-server_hostkey =
 LIBSSH2_ALLOC(session, session-server_hostkey_len);


 }}}

 For some execution paths, session-server_hostkey is already allocated, so
 when the contents of the pointer are replaced, there's a leak.

 Oddly, I found it while SSHing into a Synology device, and it's fully
 repeatable. What's strange is that I don't get the leak when connecting to
 a proper Linux install such as Debian 7.

 For now, my workaround is to add

 {{{
 if (session-server_hostkey) {
 LIBSSH2_FREE(session, session-server_hostkey);
 }


 }}}

 just above the leaking call, but that doesn't seem like the most reliable
 solution to me, since it seems like the code is reusing a session which
 hasn't been cleared properly, and there's probably more cleanup that
 should be done against the session.

-- 
Ticket URL: https://trac.libssh2.org/ticket/300
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #168: Memory leak in libssh2_session_startup

2015-04-03 Thread libssh2 Trac
#168: Memory leak in libssh2_session_startup
---+---
  Reporter:  jcollins  |  Owner:
  Type:  defect| Status:  new
  Priority:  normal|  Milestone:
 Component:  API   |Version:  1.2.4
Resolution:|   Keywords:
Blocked By:| Blocks:
---+---

Comment (by alamaison):

 Replying to [comment:4 ssbssa]:
  Like this, or did you mean more?

 Could you resubmit your patch with a different filename?  There's a bug in
 Trac that prevents the moderator accepting your submission, because the
 patch name already exists in this ticket.

-- 
Ticket URL: https://trac.libssh2.org/ticket/168#comment:5
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #168: Memory leak in libssh2_session_startup

2015-04-02 Thread libssh2 Trac
#168: Memory leak in libssh2_session_startup
---+---
  Reporter:  jcollins  |  Owner:
  Type:  defect| Status:  new
  Priority:  normal|  Milestone:
 Component:  API   |Version:  1.2.4
Resolution:|   Keywords:
Blocked By:| Blocks:
---+---

Comment (by alamaison):

 The fix looks good.  Could you add some comments to the patch so that, in
 a year's time, people aren't scratching their heads trying to work out why
 the gcrypt version uses NULL.

-- 
Ticket URL: https://trac.libssh2.org/ticket/168#comment:3
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #295: latest libssh2 library with support 64 bit architecture fails to authenticate with public key (RSA) libssh2_userauth_publickey_fromfile

2015-04-02 Thread libssh2 Trac
#295: latest libssh2 library with support 64 bit architecture fails to
authenticate with public key (RSA)  libssh2_userauth_publickey_fromfile
-+---
  Reporter:  ios3|  Owner:
  Type:  defect  | Status:  new
  Priority:  normal  |  Milestone:  1.4.3
 Component:  API |Version:  1.4.2
Resolution:  |   Keywords:
Blocked By:  | Blocks:
-+---

Comment (by ios3):

 Hey, is it enough info? I have described above with way I am going. IS it
 ok?

-- 
Ticket URL: https://trac.libssh2.org/ticket/295#comment:4
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #298: Memory leak

2015-04-02 Thread libssh2 Trac
#298: Memory leak
--+
  Reporter:  double   |  Owner:
  Type:  defect   | Status:  closed
  Priority:  normal   |  Milestone:  1.4.3
 Component:  crypto   |Version:  1.5.0
Resolution:  wontfix  |   Keywords:
Blocked By:   | Blocks:
--+
Changes (by alamaison):

 * status:  new = closed
 * resolution:   = wontfix


Comment:

 Agreed.  OpenSSL doesn't count calls to OpenSSL_add_all_algorithms() and
 matching calls to EVP_cleanup().  Until
 [http://rt.openssl.org/Ticket/Display.html?id=2217user=guestpass=guest
 that is fixed] (don't hold your breath), we can't safely call
 EVP_cleanup().

 If you want to avoid the memory leak (it's not really a leak - just looks
 like one to valgrind), call it yourself in your application.

-- 
Ticket URL: https://trac.libssh2.org/ticket/298#comment:2
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #299: Second memory leak

2015-04-02 Thread libssh2 Trac
#299: Second memory leak
-+---
  Reporter:  double  |  Owner:
  Type:  defect  | Status:  new
  Priority:  normal  |  Milestone:  1.4.3
 Component:  crypto  |Version:  1.4.2
Resolution:  |   Keywords:
Blocked By:  | Blocks:
-+---

Comment (by alamaison):

 Like #298, these are probably not real leaks.  OpenSSL caches various
 pieces of global data that it initialises on demand.  Once loaded, it
 caches them for the lifetime of the program.  Some even _have_ to be kept
 for security reasons.

 If they are causing a problem by creating false positives when you're
 checking for memory leaks, try calling some of the globally-destructive
 OpenSSL cleanup functions in your application, only when running your leak
 checker or test suite.

 The following works for me:

 {{{
 ::RAND_cleanup();
 ::ENGINE_cleanup();
 ::CONF_modules_unload(1);
 ::CONF_modules_free();
 ::EVP_cleanup();
 ::ERR_free_strings();
 ::ERR_remove_state(0);
 ::CRYPTO_cleanup_all_ex_data();
 }}}

-- 
Ticket URL: https://trac.libssh2.org/ticket/299#comment:1
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


[libssh2] #299: Second memory leak

2015-04-01 Thread libssh2 Trac
#299: Second memory leak
+
 Reporter:  double  |   Owner:
 Type:  defect  |  Status:  new
 Priority:  normal  |   Milestone:  1.4.3
Component:  crypto  | Version:  1.4.2
 Keywords:  |  Blocked By:
   Blocks:  |
+
 Valgrind output:

 =3020== 24 bytes in 1 blocks are still reachable in loss record 1 of 6
 ==3020==at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-
 amd64-linux.so)
 ==3020==by 0x80DED72: CRYPTO_malloc (in /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0)
 ==3020==by 0x80E00E5: ??? (in /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0)
 ==3020==by 0x80E0A8A: ??? (in /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0)
 ==3020==by 0x8147926: RSA_new_method (in /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0)
 ==3020==by 0x5CADD56: _libssh2_rsa_new (openssl.c:69)
 ==3020==by 0x5C99785: hostkey_method_ssh_rsa_init (hostkey.c:95)
 ==3020==by 0x5C99E4E: diffie_hellman_sha1 (kex.c:267)
 ==3020==by 0x5C9B2A6:
 kex_method_diffie_hellman_group14_sha1_key_exchange (kex.c:799)
 ==3020==by 0x5C9BD89: _libssh2_kex_exchange (kex.c:1770)
 ==3020==by 0x5CA2756: libssh2_session_handshake (session.c:723)
 ==3020==by 0x912119: ssh2_connect() (ssh.c:612)
 ==3020==
 ==3020== 24 bytes in 1 blocks are still reachable in loss record 2 of 6
 ==3020==at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-
 amd64-linux.so)
 ==3020==by 0x80DED72: CRYPTO_malloc (in /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0)
 ==3020==by 0x8164C7A: lh_insert (in /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0)
 ==3020==by 0x80E0113: ??? (in /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0)
 ==3020==by 0x80E0A8A: ??? (in /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0)
 ==3020==by 0x8147926: RSA_new_method (in /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0)
 ==3020==by 0x5CADD56: _libssh2_rsa_new (openssl.c:69)
 ==3020==by 0x5C99785: hostkey_method_ssh_rsa_init (hostkey.c:95)
 ==3020==by 0x5C99E4E: diffie_hellman_sha1 (kex.c:267)
 ==3020==by 0x5C9B2A6:
 kex_method_diffie_hellman_group14_sha1_key_exchange (kex.c:799)
 ==3020==by 0x5C9BD89: _libssh2_kex_exchange (kex.c:1770)
 ==3020==by 0x5CA2756: libssh2_session_handshake (session.c:723)
 ==3020==
 ==3020== 32 bytes in 1 blocks are still reachable in loss record 3 of 6
 ==3020==at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-
 amd64-linux.so)
 ==3020==by 0x80DED72: CRYPTO_malloc (in /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0)
 ==3020==by 0x816426E: sk_new (in /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0)
 ==3020==by 0x80E00FB: ??? (in /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0)
 ==3020==by 0x80E0A8A: ??? (in /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0)
 ==3020==by 0x8147926: RSA_new_method (in /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0)
 ==3020==by 0x5CADD56: _libssh2_rsa_new (openssl.c:69)
 ==3020==by 0x5C99785: hostkey_method_ssh_rsa_init (hostkey.c:95)
 ==3020==by 0x5C99E4E: diffie_hellman_sha1 (kex.c:267)
 ==3020==by 0x5C9B2A6:
 kex_method_diffie_hellman_group14_sha1_key_exchange (kex.c:799)
 ==3020==by 0x5C9BD89: _libssh2_kex_exchange (kex.c:1770)
 ==3020==by 0x5CA2756: libssh2_session_handshake (session.c:723)
 ==3020==
 ==3020== 32 bytes in 1 blocks are still reachable in loss record 4 of 6
 ==3020==at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-
 amd64-linux.so)
 ==3020==by 0x80DED72: CRYPTO_malloc (in /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0)
 ==3020==by 0x816428C: sk_new (in /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0)
 ==3020==by 0x80E00FB: ??? (in /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0)
 ==3020==by 0x80E0A8A: ??? (in /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0)
 ==3020==by 0x8147926: RSA_new_method (in /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0)
 ==3020==by 0x5CADD56: _libssh2_rsa_new (openssl.c:69)
 ==3020==by 0x5C99785: hostkey_method_ssh_rsa_init (hostkey.c:95)
 ==3020==by 0x5C99E4E: diffie_hellman_sha1 (kex.c:267)
 ==3020==by 0x5C9B2A6:
 kex_method_diffie_hellman_group14_sha1_key_exchange (kex.c:799)
 ==3020==by 0x5C9BD89: _libssh2_kex_exchange (kex.c:1770)
 ==3020==by 0x5CA2756: libssh2_session_handshake (session.c:723)
 ==3020==
 ==3020== 128 bytes in 1 blocks are still reachable in loss record 5 of 6
 ==3020==at 0x4C2AB80: malloc (in /usr/lib/valgrind/vgpreload_memcheck-
 amd64-linux.so)
 ==3020==by 0x80DED72: CRYPTO_malloc (in /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0)
 ==3020==by 0x8164961: lh_new (in /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0)
 ==3020==by 0x80E0034: ??? (in /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0)
 ==3020==by 0x80E00C4: ??? (in /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0)
 ==3020==by 0x80E0A8A: ??? (in /lib/x86_64-linux-
 gnu/libcrypto.so.1.0.0)
 ==3020==by 0x8147926: RSA_new_method (in /lib/x86_64-linux-
 

[libssh2] #298: Memory leak

2015-04-01 Thread libssh2 Trac
#298: Memory leak
+
 Reporter:  double  |   Owner:
 Type:  defect  |  Status:  new
 Priority:  normal  |   Milestone:  1.4.3
Component:  crypto  | Version:  1.5.0
 Keywords:  |  Blocked By:
   Blocks:  |
+
 First: Thanks a lot for the new release.
 There is a memory leak with openssl: You call
 OpenSSL_add_all_algorithms() on init, but you don't free the memory on
 exit:
 https://www.openssl.org/docs/crypto/OpenSSL_add_all_algorithms.html

 Replace:

 #define libssh2_crypto_init() OpenSSL_add_all_algorithms()
 #define libssh2_crypto_exit()

 With:

 #define libssh2_crypto_init() OpenSSL_add_all_algorithms()
 #define libssh2_crypto_exit() EVP_cleanup();

 Thanks a lot!

-- 
Ticket URL: https://trac.libssh2.org/ticket/298
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #168: Memory leak in libssh2_session_startup

2015-04-01 Thread libssh2 Trac
#168: Memory leak in libssh2_session_startup
---+---
  Reporter:  jcollins  |  Owner:
  Type:  defect| Status:  new
  Priority:  normal|  Milestone:
 Component:  API   |Version:  1.2.4
Resolution:|   Keywords:
Blocked By:| Blocks:
---+---

Comment (by ssbssa):

 The problem here is that gcry_mpi_scan() doesn't use the bignum provided
 by the argument, instead it creates a new one and overrides the one
 created by gcry_mpi_new() before.

 I've attached a possible solution.

-- 
Ticket URL: https://trac.libssh2.org/ticket/168#comment:2
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #298: Memory leak

2015-04-01 Thread libssh2 Trac
#298: Memory leak
-+---
  Reporter:  double  |  Owner:
  Type:  defect  | Status:  new
  Priority:  normal  |  Milestone:  1.4.3
 Component:  crypto  |Version:  1.5.0
Resolution:  |   Keywords:
Blocked By:  | Blocks:
-+---

Comment (by dottedmag):

 This might be undesirable as application which uses libssh2 might have
 other ideas about OpenSSL algorithms lifetime.

-- 
Ticket URL: https://trac.libssh2.org/ticket/298#comment:1
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #296: OpenSSL picked up even with `--enable-gcrypt`

2015-03-30 Thread libssh2 Trac
#296: OpenSSL picked up even with `--enable-gcrypt`
+---
  Reporter:  dottedmag  |  Owner:
  Type:  defect | Status:  new
  Priority:  normal |  Milestone:
 Component:  misc   |Version:  1.5.0
Resolution: |   Keywords:
Blocked By: | Blocks:
+---
Changes (by dottedmag):

 * version:   = 1.5.0


-- 
Ticket URL: https://trac.libssh2.org/ticket/296#comment:1
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


[libssh2] #297: `libssh2_{md5, sha1}{, _init}` symbols are exposed in OpenSSL build

2015-03-30 Thread libssh2 Trac
#297: `libssh2_{md5,sha1}{,_init}` symbols are exposed in OpenSSL build
---+--
 Reporter:  dottedmag  |   Owner:
 Type:  defect |  Status:  new
 Priority:  normal |   Milestone:
Component:  misc   | Version:
 Keywords: |  Blocked By:
   Blocks: |
---+--
 If libssh2 is built with OpenSSL, then internal symbols
 `libssh2_md5_init`, `libssh2_md5`, `libssh2_sha1_init`, `libssh2_sha1` are
 exposed. `gcrypt`-based builds do not expose them.

-- 
Ticket URL: https://trac.libssh2.org/ticket/297
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


[libssh2] #296: OpenSSL picked up even with `--enable-gcrypt`

2015-03-30 Thread libssh2 Trac
#296: OpenSSL picked up even with `--enable-gcrypt`
---+--
 Reporter:  dottedmag  |   Owner:
 Type:  defect |  Status:  new
 Priority:  normal |   Milestone:
Component:  misc   | Version:
 Keywords: |  Blocked By:
   Blocks: |
---+--
 If there are OpenSSL headers/library on the system, it gets picked up
 automatically even if `--enable-gcrypt` is specified. One has to
 explicitly pass `--disable-openssl` to get `gcrypt`-enabled build.

-- 
Ticket URL: https://trac.libssh2.org/ticket/296
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #293: error in direct_tcpip.c example

2015-03-25 Thread libssh2 Trac
#293: error in direct_tcpip.c example
---+
  Reporter:  bbo   |  Owner:
  Type:  defect| Status:  closed
  Priority:  normal|  Milestone:  1.5.0
 Component:  examples  |Version:  1.4.2
Resolution:  fixed |   Keywords:
Blocked By:| Blocks:
---+

Comment (by bbo):

 I think it would be good to apply the fix in other examples which also use
 the libssh2_channel_write API:
 - tcpip-forward.c
 - x11.c
 - subsystem_netconf.c
 - ssh2_echo.c

-- 
Ticket URL: https://trac.libssh2.org/ticket/293#comment:2
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #295: latest libssh2 library with support 64 bit architecture fails to authenticate with public key (RSA) libssh2_userauth_publickey_fromfile

2015-03-23 Thread libssh2 Trac
#295: latest libssh2 library with support 64 bit architecture fails to
authenticate with public key (RSA)  libssh2_userauth_publickey_fromfile
-+---
  Reporter:  ios3|  Owner:
  Type:  defect  | Status:  new
  Priority:  normal  |  Milestone:  1.4.3
 Component:  API |Version:  1.4.2
Resolution:  |   Keywords:
Blocked By:  | Blocks:
-+---

Comment (by ios3):

 We have developed one iOS application to ssh using libssh2 library. There
 is all things working fine with libssh2 version 1.4.2, But I required to
 use 1.4.3 version to support arm64 bit architecture.

 I have update version and now using with 1.4.3 all things is working fine
 except key authentication. I have made one RSA key to ssh with my server,
 I have copied public key in authorized key file so that we can connect
 with that pc/server.

 Using this key when I try to connect/ssh it returns me error
 -18LIBSSH2_ERROR_AUTHENTICATION_FAILED. When I tried to ssh with same
 key and same server it allows me without any issue using version 1.4.2
 (older one). I don't what's happen.

 USing this method with para to check authenticate status
 libssh2_userauth_publickey_fromfile(session, username, pubkey,privatekey
 ,password);

 Below is detail how I m gettig para
 const char *pubkey= [_publicKey
 cStringUsingEncoding:NSUTF8StringEncoding];
 const char *privatekey= [_privateKey
 cStringUsingEncoding:NSUTF8StringEncoding];
 password=NULL
 const char* username = [username1
 cStringUsingEncoding:NSUTF8StringEncoding];
 const char* password = [passWd cStringUsingEncoding:NSUTF8StringEncoding];

 Please let me know if any thing wrong or missing here. FOr key I haven't
 use any password while generate it.

 Let me know if any more info require.

 Thanks.

-- 
Ticket URL: https://trac.libssh2.org/ticket/295#comment:3
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #290: segfault in diffie_hellman_sha1

2015-03-23 Thread libssh2 Trac
#290: segfault in diffie_hellman_sha1
-+
  Reporter:  mstrsn  |  Owner:
  Type:  defect  | Status:  closed
  Priority:  normal  |  Milestone:
 Component:  crypto  |Version:  1.4.2
Resolution:  fixed   |   Keywords:
Blocked By:  | Blocks:
-+
Changes (by mback2k):

 * status:  new = closed
 * resolution:   = fixed
 * milestone:  1.4.3 =


Comment:

 Fixed with commit 7ca44fbd9467abbe1f54be34f94069c561ded397. Thanks for the
 suggestion.

-- 
Ticket URL: https://trac.libssh2.org/ticket/290#comment:1
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #281: Possible bug in direct_tcpip.c

2015-03-23 Thread libssh2 Trac
#281: Possible bug in direct_tcpip.c
---+
  Reporter:  jakob |  Owner:
  Type:  defect| Status:  closed
  Priority:  normal|  Milestone:  1.5.0
 Component:  examples  |Version:  1.4.2
Resolution:  fixed |   Keywords:
Blocked By:| Blocks:
---+
Changes (by mback2k):

 * status:  new = closed
 * resolution:   = fixed
 * milestone:  1.4.3 = 1.5.0


Comment:

 Fixed with commit a1e744bb5eb2f95026b1392d16a8f24f5136366b. Thanks, Jakob.

-- 
Ticket URL: https://trac.libssh2.org/ticket/281#comment:1
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #293: error in direct_tcpip.c example

2015-03-23 Thread libssh2 Trac
#293: error in direct_tcpip.c example
---+
  Reporter:  bbo   |  Owner:
  Type:  defect| Status:  closed
  Priority:  normal|  Milestone:  1.5.0
 Component:  examples  |Version:  1.4.2
Resolution:  fixed |   Keywords:
Blocked By:| Blocks:
---+
Changes (by mback2k):

 * status:  new = closed
 * resolution:   = fixed


Comment:

 Fixed with commit a1e744bb5eb2f95026b1392d16a8f24f5136366b. Thanks, Jakob.

-- 
Ticket URL: https://trac.libssh2.org/ticket/293#comment:1
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #295: latest libssh2 library with support 64 bit architecture fails to authenticate with public key (RSA) libssh2_userauth_publickey_fromfile

2015-03-16 Thread libssh2 Trac
#295: latest libssh2 library with support 64 bit architecture fails to
authenticate with public key (RSA)  libssh2_userauth_publickey_fromfile
-+---
  Reporter:  ios3|  Owner:
  Type:  defect  | Status:  new
  Priority:  normal  |  Milestone:  1.4.3
 Component:  API |Version:  1.4.2
Resolution:  |   Keywords:
Blocked By:  | Blocks:
-+---

Comment (by bagder):

 You need to provide more info. I use libssh2 on nothing but 64bit archs
 and I have not experienced any problems.

 Can you bisect your way to the offending commit that introduced the
 problem you see?

-- 
Ticket URL: https://trac.libssh2.org/ticket/295#comment:2
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #295: latest libssh2 library with support 64 bit architecture fails to authenticate with public key (RSA) libssh2_userauth_publickey_fromfile

2015-03-16 Thread libssh2 Trac
#295: latest libssh2 library with support 64 bit architecture fails to
authenticate with public key (RSA)  libssh2_userauth_publickey_fromfile
-+---
  Reporter:  ios3|  Owner:
  Type:  defect  | Status:  new
  Priority:  normal  |  Milestone:  1.4.3
 Component:  API |Version:  1.4.2
Resolution:  |   Keywords:
Blocked By:  | Blocks:
-+---

Comment (by ios3):

 Hi..please give me some feedback about issue, Is there something wrong
 with library or am I missing something? As with older version it's working
 fine.

-- 
Ticket URL: https://trac.libssh2.org/ticket/295#comment:1
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


[libssh2] #295: latest libssh2 library with support 64 bit architecture fails to authenticate with public key (RSA) libssh2_userauth_publickey_fromfile

2015-03-04 Thread libssh2 Trac
#295: latest libssh2 library with support 64 bit architecture fails to
authenticate with public key (RSA)  libssh2_userauth_publickey_fromfile
+
 Reporter:  ios3|   Owner:
 Type:  defect  |  Status:  new
 Priority:  normal  |   Milestone:  1.4.3
Component:  API | Version:  1.4.2
 Keywords:  |  Blocked By:
   Blocks:  |
+
 It's working fine with older version of library to ssh with public key.
 But for same key If i tried to ssh it fails to authenticate and returns
 -18(LIBSSH2_ERROR_AUTHENTICATION_FAILED) in function
 libssh2_userauth_publickey_fromfile(session, username, publickey,
 privatekey, passphrase). What's wrong with new version of library?
 I am using it in iOS application. I am using version 1.4.3

-- 
Ticket URL: https://trac.libssh2.org/ticket/295
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


[libssh2] #294: DoS condition: read from unmapped memory region causes libssh2 to crash

2015-02-27 Thread libssh2 Trac
#294: DoS condition: read from unmapped memory region causes libssh2 to crash
--+
 Reporter:  mzet  |   Owner:
 Type:  defect|  Status:  new
 Priority:  high  |   Milestone:  1.4.3
Component:  protocol  | Version:
 Keywords:  security  |  Blocked By:
   Blocks:|
--+
 Affected are versions 1.4.3 and latest development version.

 Issue
 =

 Specifically crafted input from ssh server causes read access from
 unmapped memory region resulting in crash (Segmentation fault) and causing
 denial of service condition.

 Valgrind output:
 ==3670== Process terminating with default action of signal 11 (SIGSEGV)
 ==3670==  Access not within mapped region at address 0x6AA107D8
 ==3670==at 0x4087DB: _libssh2_ntohu32 (misc.c:163)
 ==3670==by 0x419E62: kex_agree_methods (kex.c:1583)
 ==3670==by 0x41A5CB: _libssh2_kex_exchange (kex.c:1749)
 ==3670==by 0x40C964: session_startup (session.c:723)
 ==3670==by 0x40CC04: libssh2_session_handshake (session.c:801)
 ==3670==by 0x402BCE: main (ssh2.c:118)

 The issue is caused by following code in kex.c:kex_agree_methods(...)
 function:

 /* Locate each string */
 kex_len = _libssh2_ntohu32(s);
 kex = s + 4;
 s += 4 + kex_len;
 hostkey_len = _libssh2_ntohu32(s);
 hostkey = s + 4;
 s += 4 + hostkey_len;
 crypt_cs_len = _libssh2_ntohu32(s);
 crypt_cs = s + 4;
 s += 4 + crypt_cs_len;
 crypt_sc_len = _libssh2_ntohu32(s);
 crypt_sc = s + 4;
 s += 4 + crypt_sc_len;
 mac_cs_len = _libssh2_ntohu32(s);
 mac_cs = s + 4;
 s += 4 + mac_cs_len;
 mac_sc_len = _libssh2_ntohu32(s);
 mac_sc = s + 4;
 s += 4 + mac_sc_len;
 comp_cs_len = _libssh2_ntohu32(s);
 comp_cs = s + 4;
 s += 4 + comp_cs_len;
 comp_sc_len = _libssh2_ntohu32(s);
 comp_sc = s + 4;

 It can be observed that various length fields (kex_len, hostkey_len,
 mac_cs_len, etc.) are taken from (untrusted) input and are used as offsets
 to memory location ('s' pointer) without any validation.

 Reproduction
 

 I'm attaching 'crash.input' file, an example of input that triggers this
 issue which could be reproduced with following steps:

 Run malicious 'ssh server':
 # cat crash.input | nc -l -p 22

 Run ssh2 from libssh2/example:
 $ ./ssh2 127.0.0.1

 Fix
 ===

 Proposed patch that fixes this issue is attached.

-- 
Ticket URL: https://trac.libssh2.org/ticket/294
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #286: LibSSH2-HEAD can't be used with OpenBSD 5.5

2015-01-27 Thread libssh2 Trac
#286: LibSSH2-HEAD can't be used with OpenBSD 5.5
--+---
  Reporter:  jamesmoore   |  Owner:
  Type:  enhancement  | Status:  new
  Priority:  normal   |  Milestone:  1.4.3
 Component:  crypto   |Version:  1.4.2
Resolution:   |   Keywords:
Blocked By:   | Blocks:
--+---

Comment (by wanzh02):

 Need SHA-2 support too. Do you have a schedule for this enhancement?

-- 
Ticket URL: https://trac.libssh2.org/ticket/286#comment:1
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #288: Maximum concurrent connections to uniq servers

2014-12-16 Thread libssh2 Trac
#288: Maximum concurrent connections to uniq servers
---+-
  Reporter:  dsyeager  |  Owner:  Scott Yeager
  Type:  defect| Status:  new
  Priority:  normal|  Milestone:  1.4.3
 Component:  API   |Version:  1.4.2
Resolution:|   Keywords:  Maximum Connections
Blocked By:| Blocks:
---+-
Changes (by raysatiro):

 * cc: raysatiro@… (added)


-- 
Ticket URL: https://trac.libssh2.org/ticket/288#comment:2
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


[libssh2] #293: error in direct_tcpip.c example

2014-12-16 Thread libssh2 Trac
#293: error in direct_tcpip.c example
--+
 Reporter:  bbo   |   Owner:
 Type:  defect|  Status:  new
 Priority:  normal|   Milestone:  1.5.0
Component:  examples  | Version:  1.4.2
 Keywords:|  Blocked By:
   Blocks:|
--+
 The example direct_tcpip.c doesn't take care of EAGAIN case return by
 libssh2_channel_write. This can lead to non transmitted file when this
 error is raised, while this should just delay the transmission because the
 socket are busy.
 To see the error, just run a process with high priority on the receiver of
 data trasnmitted through the libssh2_channel_write.
 Solution is just to retry the call to libssh2_channel_write one (or
 several) other time.

 Here under is the current code taken from the git repo today:
 Git repo code:

 wr = 0;
 do {
   i = libssh2_channel_write(channel, buf, len);
   if (i  0) {
 fprintf(stderr, libssh2_channel_write: %d\n, i);
 goto shutdown;
   }
   wr += i;
 } while(i  0  wr  len);

 Code patched:
 wr = 0;
 do {
   i = libssh2_channel_write(channel, buf, len);
   if (i = 0)
   {
 wr += i;
   }
   else if(i == LIBSSH2_ERROR_EAGAIN)
   {
 fprintf(stderr, libssh2_channel_write: LIBSSH2_ERROR_EAGAIN, retry to
 write\n);
   }
   else {
 fprintf(stderr, libssh2_channel_write: %d\n, i);
 goto shutdown;
   }
 } while(wr  len);

-- 
Ticket URL: https://trac.libssh2.org/ticket/293
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #292: Wrap all uses of socket with callbacks for better compatibility

2014-12-16 Thread libssh2 Trac
#292: Wrap all uses of socket with callbacks for better compatibility
--+-
  Reporter:  Eschaton |  Owner:
  Type:  enhancement  | Status:  new
  Priority:  normal   |  Milestone:
 Component:  API  |Version:
Resolution:   |   Keywords:
Blocked By:   | Blocks:
--+-

Comment (by Eschaton):

 I've looked at this and it appears it would be pretty straightforward to
 do with only three additional callbacks modeled after the recv/send
 callbacks:

 - A get_blocking callback to get the current blocking state of the socket
 in the couple places it's checked
 - A set_blocking callback to set the current blocking state of the socket
 in the couple places it's adjusted
 - A poll callback to be used by _libssh2_wait_socket() and possibly the
 deprecated libssh2_poll()

 With only those three callbacks, it should be possible to layer libssh2
 atop an arbitrary transport rather than specifically atop Berkeley
 sockets.

-- 
Ticket URL: https://trac.libssh2.org/ticket/292#comment:1
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #291: libssh2_agent_connect always returns -39 when using in on iOS

2014-12-16 Thread libssh2 Trac
#291: libssh2_agent_connect always returns -39 when using in on iOS
-+---
  Reporter:  ali312  |  Owner:
  Type:  defect  | Status:  new
  Priority:  normal  |  Milestone:  1.4.3
 Component:  API |Version:  1.4.2
Resolution:  |   Keywords:
Blocked By:  | Blocks:
-+---

Comment (by Eschaton):

 Apps on iOS can't run or communicate with their own daemons/agents, and
 iOS doesn't run an ssh agent itself, so this is behaving correctly.

-- 
Ticket URL: https://trac.libssh2.org/ticket/291#comment:1
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #287: LIBSSH2_FX_PERMISSION_DENIED on reading file from other user

2014-12-04 Thread libssh2 Trac
#287: LIBSSH2_FX_PERMISSION_DENIED on reading file from other user
---+---
  Reporter:  pschultz  |  Owner:
  Type:  defect| Status:  new
  Priority:  normal|  Milestone:  1.4.3
 Component:  SFTP  |Version:  1.4.2
Resolution:|   Keywords:  sftp open file permission
Blocked By:| Blocks:
---+---

Comment (by bagder):

 This project is just seriously undermanned and underpowered. If you have
 specific questions then I suggest trying to ask them on the mailing list.
 We're all volunteers and I personally have had little time or energy for
 libssh2 lately.

-- 
Ticket URL: https://trac.libssh2.org/ticket/287#comment:2
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #288: Maximum concurrent connections to uniq servers

2014-12-04 Thread libssh2 Trac
#288: Maximum concurrent connections to uniq servers
---+-
  Reporter:  dsyeager  |  Owner:  Scott Yeager
  Type:  defect| Status:  new
  Priority:  normal|  Milestone:  1.4.3
 Component:  API   |Version:  1.4.2
Resolution:|   Keywords:  Maximum Connections
Blocked By:| Blocks:
---+-

Comment (by bagder):

 Are you possibly using select() ? Then using file descriptors over 1024 is
 a common problem and source for pain and sorrow. Also, most *nix systems
 by default only allows 1024 concurrent open file descriptors.

-- 
Ticket URL: https://trac.libssh2.org/ticket/288#comment:1
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #289: Configure check for EVP_aes_128_ctr does not work properly

2014-12-04 Thread libssh2 Trac
#289: Configure check for EVP_aes_128_ctr does not work properly
---+--
  Reporter:  maurerpe  |  Owner:  bagder
  Type:  defect| Status:  closed
  Priority:  normal|  Milestone:  1.4.3
 Component:  misc  |Version:  1.4.2
Resolution:  fixed |   Keywords:  autoconf EVP_aes_128_ctr
Blocked By:| Blocks:
---+--
Changes (by bagder):

 * owner:   = bagder
 * status:  new = closed
 * resolution:   = fixed


Comment:

 In [changeset:751e0087a874fe771db2748e5d11b29c50fd52bb/libssh2]:
 {{{
 #!CommitTicketReference repository=libssh2
 revision=751e0087a874fe771db2748e5d11b29c50fd52bb
 configure: change LIBS not LDFLAGS when checking for libs

 Closes #289

 Patch-by: maurerpe
 }}}

-- 
Ticket URL: https://trac.libssh2.org/ticket/289#comment:1
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


[libssh2] #289: Configure check for EVP_aes_128_ctr does not work properly

2014-12-03 Thread libssh2 Trac
#289: Configure check for EVP_aes_128_ctr does not work properly
--+
 Reporter:  maurerpe  |   Owner:
 Type:  defect|  Status:  new
 Priority:  normal|   Milestone:  1.4.3
Component:  misc  | Version:  1.4.2
 Keywords:  autoconf EVP_aes_128_ctr  |  Blocked By:
   Blocks:|
--+
 configure never detects EVP_aes_128_ctr even when it is present in
 openssl.  I have confirmed this in libssh2 1.4.3 using both openssl 1.0.1h
 and libressl 2.0.5.

 The issue seems to be the order in which libraries appear on the command
 line for the configure test.  I have a simple patch that resolves the
 issue and causes libssh2 to properly detect EVP_aes_128_ctr for both
 openssl and libressl.

 The solution is to use put the libs (-lcrypto -lssl) in the LIBS variable
 and not the LDFLAGS variable.  Patch attached.

-- 
Ticket URL: https://trac.libssh2.org/ticket/289
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #287: LIBSSH2_FX_PERMISSION_DENIED on reading file from other user

2014-12-03 Thread libssh2 Trac
#287: LIBSSH2_FX_PERMISSION_DENIED on reading file from other user
---+---
  Reporter:  pschultz  |  Owner:
  Type:  defect| Status:  new
  Priority:  normal|  Milestone:  1.4.3
 Component:  SFTP  |Version:  1.4.2
Resolution:|   Keywords:  sftp open file permission
Blocked By:| Blocks:
---+---

Comment (by pschultz):

 What have I to do to get any answer?
 Am I really the only one with this problem?
 Did I make any errors on creating this ticket? Is it read only?

 I am very disappointed from libssh2.org.

-- 
Ticket URL: https://trac.libssh2.org/ticket/287#comment:1
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


[libssh2] #290: segfault in diffie_hellman_sha1

2014-12-03 Thread libssh2 Trac
#290: segfault in diffie_hellman_sha1
+
 Reporter:  mstrsn  |   Owner:
 Type:  defect  |  Status:  new
 Priority:  normal  |   Milestone:  1.4.3
Component:  crypto  | Version:  1.4.2
 Keywords:  |  Blocked By:
   Blocks:  |
+
 If an application happens to call the OpenSSL routine EVP_cleanup, then
 libssh2 will generate a segfault at the call to libssh2_sh1_update at line
 249 in kex.c. Of course, the application should not call EVP_cleanup
 prematurely, but to avoid crashes in your library, I suggest you guard
 against this possibility in a manner similar to your guard around the call
 to libssh2_md5_update at line 222 in kex.c.

-- 
Ticket URL: https://trac.libssh2.org/ticket/290
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


[libssh2] #292: Wrap all uses of socket with callbacks for better compatibility

2014-12-03 Thread libssh2 Trac
#292: Wrap all uses of socket with callbacks for better compatibility
-+--
 Reporter:  Eschaton |   Owner:
 Type:  enhancement  |  Status:  new
 Priority:  normal   |   Milestone:
Component:  API  | Version:
 Keywords:   |  Blocked By:
   Blocks:   |
-+--
 Only a subset of the functions used on a socket/fd passed into libssh2 are
 wrapped in standard callbacks. For example, libssh2 will still invoke the
 stock select/poll and ioctl functions on a socket it's passed, to do
 things like check for I/O and control non-blocking behavior.

 This makes it between difficult and impossible to use libssh2 (without
 significant modification) over another transport, or even over a socket
 where full control can't be given to the library (such as a socket managed
 via dispatch I/O on OS X or iOS).

 If all calls on the socket used by libssh2 always went through semantic
 callback wrappers (eg set non blocking, set reusable and so on, rather
 than do an ioctl) then it would be possible to use libssh2 with an
 entirely-application-layer transport. It might also make it easier to
 abstract

-- 
Ticket URL: https://trac.libssh2.org/ticket/292
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


[libssh2] #286: LibSSH2-HEAD can't be used with OpenBSD 5.5

2014-04-11 Thread libssh2 Trac
#286: LibSSH2-HEAD can't be used with OpenBSD 5.5
-+
 Reporter:  jamesmoore   |   Owner:
 Type:  enhancement  |  Status:  new
 Priority:  normal   |   Milestone:  1.4.3
Component:  crypto   | Version:  1.4.2
 Keywords:   |  Blocked By:
   Blocks:   |
-+
 OpenBSD 5.5 is changing the default MACs available to sshd. Libssh2
 supplies the following

 hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96,hmac-ripemd160,hmac-
 ripemd...@openssh.com

 while OpenBSD 5.5 expects

 umac-64-...@openssh.com,umac-128-...@openssh.com,hmac-
 sha2-256-...@openssh.com,hmac-
 sha2-512-...@openssh.com,umac...@openssh.com,umac-...@openssh.com,hmac-
 sha2-256,hmac-sha2-512

 It appears libssh2's MAC support needs to be updated.

-- 
Ticket URL: https://trac.libssh2.org/ticket/286
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


[libssh2] #287: LIBSSH2_FX_PERMISSION_DENIED on reading file from other user

2014-04-11 Thread libssh2 Trac
#287: LIBSSH2_FX_PERMISSION_DENIED on reading file from other user
---+
 Reporter:  pschultz   |   Owner:
 Type:  defect |  Status:  new
 Priority:  normal |   Milestone:  1.4.3
Component:  SFTP   | Version:  1.4.2
 Keywords:  sftp open file permission  |  Blocked By:
   Blocks: |
---+
 Hi,

 I used the libssh2 examples sftp.c and sftpdir.c, lightly modified to
 get more information on the errors.

 I have to get files from several subdirectories on a SFTP Server.
 Some of these subdirectories ar written by other users, one is written by
 the user which I use as login with user and password.
 All users are in the same group.

 Getting files which are created by my user works fine.

 But when I try to get the other files then libssh2_sftp_open fails,
 libssh2_session_last_error returns -31 (= LIBSSH2_ERROR_SFTP_PROTOCOL) and
 libssh2_sftp_last_error returns 3 (= LIBSSH2_FX_PERMISSION_DENIED).

 I have no problems reading the directories (libssh2_sftp_opendir /
 libssh2_sftp_readdir_ex).


 Examples:
 My directory on the server:
 -rw-rw-r--1 My_UserGroup1   7923 Apr  9 13:49 file1   (ok)

 Another directory:
 -rw-r--r--1 Other_User Group1   1229 Apr  9 00:59 file2   (fails)


 The system I work on is SUSE Linux Enterprise Server 11 (i586).
 The version of libssh2 is 1.4.3.

 /usr/bin/sftp  has no problems, I can get all files; same on windows with
 WinSCP.
 The problem must be on my side.

 What could I make better? Are there more steps to do than coded in the
 examples?

 Thanks

 Peter

-- 
Ticket URL: https://trac.libssh2.org/ticket/287
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


[libssh2] #285: multithread calls libssh2.a error

2014-02-11 Thread libssh2 Trac
#285: multithread calls libssh2.a error
-+
 Reporter:  beiguan001   |   Owner:
 Type:  defect   |  Status:  new
 Priority:  high |   Milestone:  1.4.3
Component:  API  | Version:  1.4.2
 Keywords:  multi-thread  libssh2_session_handshake  |  Blocked By:
   Blocks:   |
-+
 When using multiple threads, in libssh2_session_handshake abnormal.
 If you do not multi-threaded, no problem.
 How to use multi-thread calls libssh2?



  main cpp//

 void* work_thread(void* arg)
 {

 string ipaddr = 132.31.0.13;
 string user = user;
 string passwd = pass;
 int port = 22;

 Ssh2Client ssh3;
 ssh3.setHost(ipaddr.c_str(), user.c_str(), passwd.c_str(), port);
 ssh3.setTimeOut(1L);//10s

 if(ssh3.ssh2_connect()  0)
 cout  Error : connect error!  endl;

 if(ssh3.ssh2_open_session()  0)
 {
 cout  Error : ssh2_open_session error!  endl;
 exit(0);
 }

 }

 int main(int argc,char* argv[])
 {
 int nthread = 1;
 pthread_t tid;

 for(int i=0;inthread;i++)
 {
   pthread_create(tid,NULL,work_thread,NULL);
 }

 }


 //Ssh2Client.cpp
 void Ssh2Client::setHost(const char *host, const char *user, const char
 *passwd, int pt)
 {
 hostname = host;
 username = user;
 password = passwd;
 port = pt;
 }

 int Ssh2Client::ssh2_connect()
 {
 int rc = 0;
 unsigned long hostaddr;
 struct sockaddr_in sin;
 #ifdef WIN32
 WSADATA wsadata;
 WSAStartup(MAKEWORD(2,0), wsadata);
 #endif

 rc = libssh2_init(0);
 if (rc != 0)
 {

 sprintf(errmsg, libssh2 initialization failed (%d)\n,
 rc);
 return -1;
 }

 thread_setup();

 hostaddr = inet_addr(hostname);
 sock = socket(AF_INET, SOCK_STREAM, 0);

 sin.sin_family = AF_INET;
 sin.sin_port = htons(port);
 sin.sin_addr.s_addr = hostaddr;
 if (connect(sock, (struct sockaddr*)(sin), sizeof(struct
 sockaddr_in)) != 0)
 {

 sprintf(errmsg, failed to connect!\n);
 return -1;
 }
 return 0;
 }


 int Ssh2Client::ssh2_open_session()
 {
 int rc = 0;
   size_t len;
   LIBSSH2_KNOWNHOSTS *nh;
   int type;
 const char *fingerprint;

 /* Create a session instance */
 session = libssh2_session_init();
 if (!session)
 return -1;

 //  libssh2_session_set_timeout(session, timeout);

 /* tell libssh2 we want it all done non-blocking */
 //libssh2_session_set_blocking(session, block);

 /* ... start it up. This will trade welcome banners, exchange keys,
  * and setup crypto, compression, and MAC layers
  */
 while ((rc = libssh2_session_handshake(session, sock)) ==
LIBSSH2_ERROR_EAGAIN);
 if (rc)
 {
 printf(File = %s, Line = %d, rc = %d\n, __FILE__, __LINE__, rc);
 sprintf(errmsg, Failure establishing SSH session: %d\n, rc);
 return -1;
 }

 nh = libssh2_knownhost_init(session);
 if(!nh) {
 /* eeek, do cleanup here */
 return -2;
 }

 /* read all hosts from here */
 libssh2_knownhost_readfile(nh, known_hosts,
LIBSSH2_KNOWNHOST_FILE_OPENSSH);

 /* store all known hosts to here */
 libssh2_knownhost_writefile(nh, dumpfile,
 LIBSSH2_KNOWNHOST_FILE_OPENSSH);

 fingerprint = libssh2_session_hostkey(session, len, type);
 if(fingerprint) {
 struct libssh2_knownhost *host;
 #if LIBSSH2_VERSION_NUM = 0x010206
 /* introduced in 1.2.6 */
 int check = libssh2_knownhost_checkp(nh, hostname, 22,
  fingerprint, len,
  LIBSSH2_KNOWNHOST_TYPE_PLAIN|
  LIBSSH2_KNOWNHOST_KEYENC_RAW,
  host);
 #else
 /* 1.2.5 or older */
 int check = libssh2_knownhost_check(nh, hostname,
 fingerprint, len,
 LIBSSH2_KNOWNHOST_TYPE_PLAIN|
 LIBSSH2_KNOWNHOST_KEYENC_RAW,
 host);
 #endif

 sprintf(errmsg, Host check: %d, key: %s\n, check,
 (check = LIBSSH2_KNOWNHOST_CHECK_MISMATCH)?
 host-key:none);

 /*
  * At this point, we could verify that 'check' tells us the key is
  * fine or bail out.
  */
  

Re: [libssh2] #285: multithread calls libssh2.a error

2014-02-11 Thread libssh2 Trac
#285: multithread calls libssh2.a error
-+-
  Reporter:  beiguan001  |  Owner:
  Type:  defect  | Status:  closed
  Priority:  high|  Milestone:  1.4.3
 Component:  API |Version:  1.4.2
Resolution:  invalid |   Keywords:  multi-thread
Blocked By:  |  libssh2_session_handshake
 | Blocks:
-+-
Changes (by bagder):

 * status:  new = closed
 * resolution:   = invalid


Comment:

 This is a bug tracker where we track and work with bugs. You did not file
 a bug report.

 If you have questions and want help on how to use libssh2, please
 subscribe to the mailing list and ask your question there!

-- 
Ticket URL: https://trac.libssh2.org/ticket/285#comment:1
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #284: Perl newbi trying to load modules locally - Net:ssh2 libssh2 dependant

2014-01-17 Thread libssh2 Trac
#284: Perl newbi trying to load modules locally - Net:ssh2 libssh2 dependant
--+
  Reporter:  popeye   |  Owner:
  Type:  defect   | Status:  closed
  Priority:  normal   |  Milestone:  1.4.3
 Component:  tests|Version:  1.4.2
Resolution:  invalid  |   Keywords:
Blocked By:   | Blocks:
--+
Changes (by alamaison):

 * status:  new = closed
 * resolution:   = invalid


Comment:

 Please direct support queries to the mailing list:
 libssh2-devel@cool.haxx.se.  This tracker is for bug reports.

-- 
Ticket URL: https://trac.libssh2.org/ticket/284#comment:1
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


[libssh2] #284: Perl newbi trying to load modules locally - Net:ssh2 libssh2 dependant

2014-01-17 Thread libssh2 Trac
#284: Perl newbi trying to load modules locally - Net:ssh2 libssh2 dependant
+
 Reporter:  popeye  |   Owner:
 Type:  defect  |  Status:  new
 Priority:  normal  |   Milestone:  1.4.3
Component:  tests   | Version:  1.4.2
 Keywords:  |  Blocked By:
   Blocks:  |
+
 Ive loaded libssh2, but when I run the perl Net::SSH2 I get the following
 :

 cpan[2] test Net::SSH2
 Running test for module 'Net::SSH2'
 Running make for R/RK/RKITOVER/Net-SSH2-0.53.tar.gz

   CPAN.pm: Building R/RK/RKITOVER/Net-SSH2-0.53.tar.gz

 Use of uninitialized value in scalar assignment at
 /home/chrivida/perl5/lib/perl5/CPAN/Distribution.pm line 1868.
 Use of uninitialized value in scalar assignment at
 /home/chrivida/perl5/lib/perl5/CPAN/Distribution.pm line 1869.
 Use of uninitialized value in scalar assignment at
 /home/chrivida/perl5/lib/perl5/CPAN/Distribution.pm line 1879.
 Use of uninitialized value in scalar assignment at
 /home/chrivida/perl5/lib/perl5/CPAN/Distribution.pm line 1880.
 Subroutine checklibs redefined at inc/Module/Install/CheckLib.pm line 11.
 Subroutine assertlibs redefined at inc/Module/Install/CheckLib.pm line 25.
 Subroutine _author_side redefined at inc/Module/Install/CheckLib.pm line
 39.

 The libssh2 library is required by this module.  If you don't have it, you
 can
 download it from http://www.libssh2.org; you may also need OpenSSL, which
 can
 be obtained from http://www.openssl.org , or libgcrypt, which can be
 obtained
 from http://www.gnupg.org .

 Debian:   sudo aptitude install libssh2-1-dev
 OpenSUSE: sudo zypper in libssh2-1 libssh2-devel

 You can pass your libssh2 lib and include dirs (and extra link args) on
 the
 command line. E.g.:

 perl Makefile.PL lib=$HOME/libssh2/lib inc=$HOME/libssh2/include \
 ldargs=-lz

 These can also be set through the
 LIBSSH2_LIB/LIBSSH2_INCLUDE/LIBSSH2_LDARGS
 environment variables.

 To build with libgcrypt instead of OpenSSL, pass 'gcrypt' as a parameter
 to
 Makefile.PL, e.g.:

 perl Makefile.PL gcrypt

 If you want to build on Windows, see the file BUILDING.WIN32 in the
 distribution.

 Can't link/include C library 'libssh2.h', 'ssh2', aborting.
 No 'Makefile' createdCPAN: YAML loaded ok (v0.84)
   RKITOVER/Net-SSH2-0.53.tar.gz
   /usr/bin/perl Makefile.PL -- NOT OK
 Running make test
   Make had some problems, won't test
 Failed during this command:
  RKITOVER/Net-SSH2-0.53.tar.gz: writemakefile NO -- No
 'Makefile' created
 cpan3

 So Im wondering if / how I can check that libssh2 is actually loaded
 correctly and how do I get perl to see the install.

 Thanks !!! Popeye

-- 
Ticket URL: https://trac.libssh2.org/ticket/284
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #283: my handshake function not working

2014-01-09 Thread libssh2 Trac
#283: my handshake function not working
+-
  Reporter:  rohitcool4050  |  Owner:
  Type:  defect | Status:  closed
  Priority:  high   |  Milestone:  1.4.3
 Component:  API|Version:  1.4.2
Resolution:  invalid|   Keywords:  libssh2_session_handshake()
Blocked By: | Blocks:
+-
Changes (by alamaison):

 * status:  new = closed
 * resolution:   = invalid


Comment:

 Please direct support queries to the mailing list:
 libssh2-devel@cool.haxx.se.  This tracker is for bug reports.

 When you do so, please include much more information, so people will be
 able to help you.  Reproducable samples and debug logs are particularly
 important.

-- 
Ticket URL: https://trac.libssh2.org/ticket/283#comment:1
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


[libssh2] #281: Possible bug in direct_tcpip.c

2014-01-08 Thread libssh2 Trac
#281: Possible bug in direct_tcpip.c
--+
 Reporter:  jakob |   Owner:
 Type:  defect|  Status:  new
 Priority:  normal|   Milestone:  1.4.3
Component:  examples  | Version:  1.4.2
 Keywords:|  Blocked By:
   Blocks:|
--+
 I think I found a bug in direct_tcpip.c

 This is the problematic section. It tries to send len bytes stored in
 buf on a channel.

 {{{
 235 wr = 0;
 236 do {
 237 i = libssh2_channel_write(channel, buf, len);
 238 if (i  0) {
 239 fprintf(stderr, libssh2_channel_write: %d\n,
 i);
 240 goto shutdown;
 241 }
 242 wr += i;
 243 } while(i  0  wr  len);
 }}}

 However, when libssh2_channel_write fails to write everything at once,
 then this code will try writing the data in buf again from the beginning!
 Also, I don't know why it aborts when i=0, this would just ignore some of
 the data.

 I think this code should rather like this:

 {{{
 235 wr = 0;
 236 while (wrlen) {
 237 i = libssh2_channel_write(channel, buf+wr, len);
 238 if (i  0) {
 239 fprintf(stderr, libssh2_channel_write: %d\n,
 i);
 240 goto shutdown;
 241 }
 242 wr += i;
 243 }
 }}}

 Please excuse that I include the code inline in this ticket, I am not very
 familiar with git, but I wanted to report this issue nevertheless.

-- 
Ticket URL: https://trac.libssh2.org/ticket/281
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


[libssh2] #282: SCP may read the wrong file if several channels are opened in parallel

2014-01-08 Thread libssh2 Trac
#282: SCP may read the wrong file if several channels are opened in parallel
---+
 Reporter:  petersohn  |   Owner:
 Type:  defect |  Status:  new
 Priority:  normal |   Milestone:  1.4.3
Component:  SCP| Version:  1.4.2
 Keywords: |  Blocked By:
   Blocks: |
---+
 Attached is a modification of the {{{scp_nonblock.c}}} example that can
 reproduce this problem. The modifications are the following:
 * Removed Windows specific code for simplicity (tested on SUSE Linux 11).
 * Multiple files can be specified on the command line (arguments after
 password).
 * Multiple files are read in parallel.
 * Each file is written to a file of the same name on the local machine.

 The problem may not always come up. I tested with 10 files of a size about
 2 MB. The problem seems to occur when establishing the channels are
 finished in a different order as they are started.

 The example works as the following.
 * The information for each channel is stored in the {{{descriptor}}}
 structure:
 {{{
 struct descriptor {
 char* filename;
 struct stat fileinfo;
 LIBSSH2_CHANNEL *channel;
 int outfd;
 off_t got;
 };
 }}}
 * Open the session and authenticate (no change of the algorithm until this
 point).
 * Enter a main loop with the exit condition specified later (when all
 files are read).
 {{{
 while(1) {
 int activeChannels = 0;
 }}}
 * Now enter an inner loop that iterates through all descriptors. Inside
 this loop we do everything we can without waiting for the socket.
 {{{
 for (i = 0; i  descriptorNum; ++i) {
 struct descriptor* desc = descriptors[i];
 int rc;
 }}}
 * If the channel is not yet established, then try to create it.
 {{{
 if (!desc-channel) {
 desc-channel = libssh2_scp_recv(session, desc-filename,
 desc-fileinfo);
 ...
 ++activeChannels;
 }}}
 * If the channel is already established, then read from it.
 {{{
 } else {
 char mem[1024*24];
 fprintf(stderr, Reading from %s...\n, desc-filename);
 do {
 ...
 rc = libssh2_channel_read(desc-channel, mem, amount);
 ...
 } while (rc  0);
 ...
 if (desc-got  desc-fileinfo.st_size) {
 ++activeChannels;
 }
 }
 }}}
 * After the inner loop, check whether we need to continue. If not, finish
 the main loop.
 {{{
 if (activeChannels  0) {
 waitsocket(sock, session); /* now we wait */
 continue;
 }
 }
 }}}

-- 
Ticket URL: https://trac.libssh2.org/ticket/282
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #280: unable to install libssh2-1.4.3

2013-12-11 Thread libssh2 Trac
#280: unable to install libssh2-1.4.3
---+---
  Reporter:  nkenglen  |  Owner:
  Type:  defect| Status:  new
  Priority:  normal|  Milestone:  1.4.3
 Component:  misc  |Version:  1.4.2
Resolution:|   Keywords:
Blocked By:| Blocks:
---+---

Comment (by danf):

 It would be much more useful to attach a log where you attempted to use
 OpenSSL, rather than one with --without-libgcrypt --without-openssl  Does
 the file /usr/local/ssl/include/openssl/ssh.h exist?

-- 
Ticket URL: https://trac.libssh2.org/ticket/280#comment:1
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


[libssh2] #280: unable to install libssh2-1.4.3

2013-12-10 Thread libssh2 Trac
#280: unable to install libssh2-1.4.3
--+
 Reporter:  nkenglen  |   Owner:
 Type:  defect|  Status:  new
 Priority:  normal|   Milestone:  1.4.3
Component:  misc  | Version:  1.4.2
 Keywords:|  Blocked By:
   Blocks:|
--+
 I'm running on Suse Linux Enterprise Server 11 SP 1 (64bit).

 I could'nt install libssh2-1.4.3.

 I have attached the config.log for your reference. The errors seem to say
 that it couldn't locate openssl/ssl.h when i did a ./configure. I tried
 with the below command:

 ./configure --without-libgcypt --with-openssl --with-openssl-
 prefix=/usr/local/ssl

 but it doesn't help.

 The OpenSSL was downloaded from www.openssl.org and OpenSSL 1.0.1e
 version was compiled and installed in /usr/local/ssl directory.

 Please help! thank you!

 PS: i couldn't attach files for this ticket. I copied and pasted below.
 Thank you!

 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.

 It was created by libssh2 configure -, which was
 generated by GNU Autoconf 2.69.  Invocation command line was

   $ ./configure --without-libgcrypt --without-openssl

 ## - ##
 ## Platform. ##
 ## - ##

 hostname = linux
 uname -m = x86_64
 uname -r = 2.6.32.12-0.7-default
 uname -s = Linux
 uname -v = #1 SMP 2010-05-20 11:14:20 +0200

 /usr/bin/uname -p = unknown
 /bin/uname -X = unknown

 /bin/arch  = x86_64
 /usr/bin/arch -k   = unknown
 /usr/convex/getsysinfo = unknown
 /usr/bin/hostinfo  = unknown
 /bin/machine   = unknown
 /usr/bin/oslevel   = unknown
 /bin/universe  = unknown

 PATH: /usr/local/ssl/bin
 PATH: /usr/local/valgrind/3.7.0/bin
 PATH: /usr/local/Parasoft/parasoft/test/9.2
 PATH: /usr/local/Parasoft/parasoft/cpptest/9.2
 PATH: /opt/tibco/tibrv/8.4/bin
 PATH: /usr/local/qt/bin
 PATH: /usr/local/ant/bin
 PATH: /usr/local/eXtremeDB/host/bin
 PATH: /usr/local/eXtremeDB/target/bin
 PATH: /usr/local/xerces-c-src_2_8_0/bin
 PATH: /usr/local/RTI/ndds.4.5e/scripts
 PATH: /usr/local/ACE_wrappers/bin
 PATH: /usr/local/ACE_wrappers/lib
 PATH: /usr/lib64/jvm/jre-1.6.0-ibm/bin
 PATH: /usr/bin
 PATH: /opt/CollabNet_Subversion/bin
 PATH: /usr/local/apache2/bin
 PATH: /home/nkenglen/bin
 PATH: /usr/sbin
 PATH: /sbin
 PATH: /usr/local/valgrind/3.7.0/bin
 PATH: /usr/local/Parasoft/parasoft/test/9.2
 PATH: /usr/local/Parasoft/parasoft/cpptest/9.2
 PATH: /opt/tibco/tibrv/8.4/bin
 PATH: /usr/local/qt/bin
 PATH: /usr/local/ant/bin
 PATH: /usr/local/eXtremeDB/host/bin
 PATH: /usr/local/eXtremeDB/target/bin
 PATH: /usr/local/xerces-c-src_2_8_0/bin
 PATH: /usr/local/RTI/ndds.4.5e/scripts
 PATH: /usr/local/ACE_wrappers/bin
 PATH: /usr/local/ACE_wrappers/lib
 PATH: /usr/lib64/jvm/jre-1.6.0-ibm/bin
 PATH: /usr/bin
 PATH: /opt/CollabNet_Subversion/bin
 PATH: /usr/local/apache2/bin
 PATH: /home/nkenglen/bin
 PATH: /usr/sbin
 PATH: /sbin
 PATH: /home/nkenglen/bin
 PATH: /usr/local/bin
 PATH: /usr/bin
 PATH: /bin
 PATH: /usr/bin/X11
 PATH: /usr/X11R6/bin
 PATH: /usr/games
 PATH: /usr/lib64/jvm/jre/bin
 PATH: /usr/lib/mit/bin
 PATH: /usr/lib/mit/sbin
 PATH: /usr/local/rational/releases/PurifyPlus.7.0.1.0-002/i386_linux2/bin
 PATH: /usr/local/rational/releases/PurifyPlus.7.0.1.0-002/i386_linux2/bin


 ## --- ##
 ## Core tests. ##
 ## --- ##

 configure:2324: checking whether to enable maintainer-specific portions of
 Makefiles
 configure:2333: result: no
 configure:2349: checking for sed
 configure:2368: found /usr/bin/sed
 configure:2381: result: /usr/bin/sed
 configure:2442: checking for a BSD-compatible install
 configure:2510: result: /usr/bin/install -c
 configure:2521: checking whether build environment is sane
 configure:2571: result: yes
 configure:2712: checking for a thread-safe mkdir -p
 configure:2751: result: /bin/mkdir -p
 configure:2764: checking for gawk
 configure:2780: found /usr/bin/gawk
 configure:2791: result: gawk
 configure:2802: checking whether make sets $(MAKE)
 configure:2824: result: yes
 configure:2904: checking libssh2 version
 configure:2906: result: 1.4.3
 configure:2917: checking build system type
 configure:2931: result: x86_64-unknown-linux-gnu
 configure:2951: checking host system type
 configure:2964: result: x86_64-unknown-linux-gnu
 configure:2991: autobuild project... libssh2
 configure:2997: autobuild revision... 1.4.3
 configure:3002: autobuild hostname... linux
 configure:3013: autobuild timestamp... 20131203-181235
 configure:3054: checking for style of include used by make
 configure:3082: result: GNU
 configure:3153: checking for gcc
 configure:3180: result: /usr/bin/gcc
 configure:3409: checking for C compiler version
 configure:3418: /usr/bin/gcc --version 5
 gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973]
 Copyright (C) 2008 Free Software Foundation, Inc.
 This is free software; see the source for 

Re: [libssh2] #279: libssh2 core dumps with FIPS openssl libraries

2013-11-21 Thread libssh2 Trac
#279: libssh2 core dumps with FIPS openssl libraries
-+--
  Reporter:  Mark_McPherson  |  Owner:  kdudka
  Type:  defect  | Status:  closed
  Priority:  high|  Milestone:  1.4.3
 Component:  crypto  |Version:  1.4.2
Resolution:  fixed   |   Keywords:  FIPS OpenSSL
Blocked By:  | Blocks:
-+--
Changes (by Mark_McPherson):

 * status:  accepted = closed
 * resolution:   = fixed


Comment:

 In [changeset:61df22c4601cd806dcc190f1252a8fbf01e67f7b/libssh2]:
 {{{
 #!CommitTicketReference repository=libssh2
 revision=61df22c4601cd806dcc190f1252a8fbf01e67f7b
 openssl: initialise the digest context before calling EVP_DigestInit()

 When using the OpenSSL libraries in FIPS mode, the function call
 EVP_DigestInit() is actually #defined to FIPS_digestinit().
 Unfortunately wheres EVP_DigestInit() initialises the context and then
 calls EVP_DigestInit_ex(), this function assumes that the context has
 been pre-initialised and crashes when it isn't.

 Bug: https://trac.libssh2.org/ticket/279

 Fixes #279
 }}}

-- 
Ticket URL: https://trac.libssh2.org/ticket/279#comment:2
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #279: libssh2 core dumps with FIPS openssl libraries

2013-11-20 Thread libssh2 Trac
#279: libssh2 core dumps with FIPS openssl libraries
-+--
  Reporter:  Mark_McPherson  |  Owner:  kdudka
  Type:  defect  | Status:  accepted
  Priority:  high|  Milestone:  1.4.3
 Component:  crypto  |Version:  1.4.2
Resolution:  |   Keywords:  FIPS OpenSSL
Blocked By:  | Blocks:
-+--
Changes (by kdudka):

 * owner:   = kdudka
 * status:  new = accepted


Comment:

 Looks good to me.  Thanks for the patch!  Could you please send me (kdudka
 at redhat com) your name and e-mail so that I can commit the patch on your
 behalf?

-- 
Ticket URL: https://trac.libssh2.org/ticket/279#comment:1
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #278: Make Update with WordPress

2013-10-28 Thread libssh2 Trac
#278: Make Update with WordPress
---+--
  Reporter:  gnoyelle  |  Owner:
  Type:  defect| Status:  closed
  Priority:  normal|  Milestone:  1.4.3
 Component:  misc  |Version:  1.4.2
Resolution:  invalid   |   Keywords:  WordPress,update
Blocked By:| Blocks:
---+--
Changes (by alamaison):

 * status:  new = closed
 * resolution:   = invalid


Comment:

 This is not the correct place to seek support.  Please direct queries to
 the [http://www.libssh2.org/mail.cgi mailing list] and use this tracker to
 report bugs and suggest new features.

-- 
Ticket URL: https://trac.libssh2.org/ticket/278#comment:1
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


[libssh2] #278: Make Update with WordPress

2013-10-28 Thread libssh2 Trac
#278: Make Update with WordPress
--+
 Reporter:  gnoyelle  |   Owner:
 Type:  defect|  Status:  new
 Priority:  normal|   Milestone:  1.4.3
Component:  misc  | Version:  1.4.2
 Keywords:  WordPress,update  |  Blocked By:
   Blocks:|
--+
 Hi
 I use on Linode VPS, Centos 6.3.
 The update are made by ssh connexion and I install of course lisssh2 v
 1.4.2
 I get many warming in debug mode like this

 {{{
 stream_set_timeout(): No support for ssh2 stream timeout. Please recompile
 with libssh2 = 1.2.9
 }}}
 Have you an idea?
 Thanks

-- 
Ticket URL: https://trac.libssh2.org/ticket/278
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #276: do not fail when keys of unknown type are read from known_hosts file

2013-10-27 Thread libssh2 Trac
#276: do not fail when keys of unknown type are read from known_hosts file
-+
  Reporter:  salva   |  Owner:  salva
  Type:  defect  | Status:  closed
  Priority:  normal  |  Milestone:  1.4.3
 Component:  misc|Version:  1.4.2
Resolution:  fixed   |   Keywords:
Blocked By:  | Blocks:
-+
Changes (by salva):

 * owner:   = salva
 * status:  new = closed
 * resolution:   = fixed


Comment:

 In [changeset:85c6627c861e970ba0bab10ec8b44b6523d6a5fd/libssh2]:
 {{{
 #!CommitTicketReference repository=libssh2
 revision=85c6627c861e970ba0bab10ec8b44b6523d6a5fd
 knownhosts: handle unknown key types

 Store but don't use keys of unsupported types on the known_hosts file.

 Currently, when libssh2 parses a known_host file containing keys of some
 type it doesn't natively support, it stops reading the file and returns
 an error.

 That means, that the known_host file can not be safely shared with other
 software supporting other key types (i.e. OpenSSH).

 This patch adds support for handling keys of unknown type. It can read
 and write them, even if they are never going to be matched.

 At the source level the patch does the following things:

 - add a new unknown key type LIBSSH2_KNOWNHOST_KEY_UNKNOWN

 - add a new slot (key_type_name) on the known_host struct that is
 used to store the key type in ascii form when it is not supported

 - parse correctly known_hosts entries with unknown key types and
 populate the key_type_name slot

 - print correctly known_hosts entries of unknown type

 - when checking a host key ignore keys that do not match the key

 Fixes #276
 }}}

-- 
Ticket URL: https://trac.libssh2.org/ticket/276#comment:5
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #262: libssh2_userauth_publickey_fromfile_ex declaration in man missis one parameter

2013-10-16 Thread libssh2 Trac
#262: libssh2_userauth_publickey_fromfile_ex declaration in man missis one
parameter
-+
  Reporter:  pastey  |  Owner:  bagder
  Type:  defect  | Status:  closed
  Priority:  low |  Milestone:  1.4.3
 Component:  SFTP|Version:  1.4.2
Resolution:  fixed   |   Keywords:  man
Blocked By:  | Blocks:
-+
Changes (by bagder):

 * owner:   = bagder
 * status:  new = closed
 * resolution:   = fixed


Comment:

 In [changeset:fa15fded72c3d51508448e6f841b3a68ac477bab/libssh2]:
 {{{
 #!CommitTicketReference repository=libssh2
 revision=fa15fded72c3d51508448e6f841b3a68ac477bab
 man page: add missing function argument

 for libssh2_userauth_publickey_fromfile_ex()

 Reported-by: pastey

 Fixes #262
 }}}

-- 
Ticket URL: https://trac.libssh2.org/ticket/262#comment:1
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #272: Build errors on Windows

2013-10-16 Thread libssh2 Trac
#272: Build errors on Windows
--+-
  Reporter:  kdekker  |  Owner:  bagder
  Type:  defect   | Status:  closed
  Priority:  normal   |  Milestone:  1.4.3
 Component:  misc |Version:  1.4.2
Resolution:  fixed|   Keywords:  build error
Blocked By:   | Blocks:
--+-
Changes (by bagder):

 * owner:   = bagder
 * status:  new = closed
 * resolution:   = fixed


Comment:

 In [changeset:c49cc8411fcbcf201f3200ad989b3dfdd0a63e41/libssh2]:
 {{{
 #!CommitTicketReference repository=libssh2
 revision=c49cc8411fcbcf201f3200ad989b3dfdd0a63e41
 windows build: fix build errors

 Fixes various link errors with VS2010

 Reported-by: kdekker
 Fixes #272
 }}}

-- 
Ticket URL: https://trac.libssh2.org/ticket/272#comment:1
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #222: Windows build settings enhancement request (diff included)

2013-10-16 Thread libssh2 Trac
#222: Windows build settings enhancement request (diff included)
---+---
  Reporter:  kdekker   |  Owner:  bagder
  Type:  defect| Status:  closed
  Priority:  normal|  Milestone:  1.4.3
 Component:  misc  |Version:  1.2.8
Resolution:  outdated  |   Keywords:  win build
Blocked By:| Blocks:
---+---
Changes (by bagder):

 * status:  assigned = closed
 * resolution:   = outdated
 * milestone:   = 1.4.3


Comment:

 I've just pushed another set of changes to these files. I consider this
 ticket out of date.

-- 
Ticket URL: https://trac.libssh2.org/ticket/222#comment:7
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


[libssh2] #277: libgcrypt and gcry_check_version in a multithreaded application.

2013-10-05 Thread libssh2 Trac
#277: libgcrypt and gcry_check_version in a multithreaded application.
-+-
 Reporter:  TMcC |   Owner:
 Type:  defect   |  Status:  new
 Priority:  normal   |   Milestone:  1.4.3
Component:  crypto   | Version:  1.4.2
 Keywords:  threads, mt, multithreaded, crypto,  |  Blocked By:
  sigabrt, gcry_check_version, gcrpyt,   |
  libgcrypt  |
   Blocks:   |
-+-
 In a multithreaded application, libssh2_init() ought to call
 gcry_check_version(), or the documentation for libssh2 ought to advise
 that libgcrpyt's gcry_check_version() must be called, before
 libssh2_init() is executed.

 Please see here: http://www.gnupg.org/documentation/manuals/gcrypt-devel
 /Initializing-the-library.html

 Without this call, we get SIGABRTs from gcrpyt.

 In summary, in a multithread application, the sequence of calls should be:

 {{{#!c
  // Enable thread safety for gcrypt.
  int result = gcry_control(GCRYCTL_SET_THREAD_CBS, gcry_threads_pthread);
  if (!gcry_check_version (GCRYPT_VERSION))
  {
  std::cerr  libgcrypt version mismatch  std::endl;
  exit (2);
  }
  libssh2_init();
 }}}

-- 
Ticket URL: https://trac.libssh2.org/ticket/277
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #275: ssh agent cannot be used non-blocking

2013-10-05 Thread libssh2 Trac
#275: ssh agent cannot be used non-blocking
--+---
  Reporter:  ccutrer  |  Owner:
  Type:  enhancement  | Status:  new
  Priority:  normal   |  Milestone:  1.4.3
 Component:  API  |Version:  1.4.2
Resolution:   |   Keywords:
Blocked By:   | Blocks:
--+---

Comment (by maxmtl):

 I am not sure if it applies to your case, but I found out that the socket
 used by libssh2 must be set non-blocking, even if the libssh2 API is used
 blocking. I did not find this in the API reference or in the examples.
 (submitting a patch for this is on my list of things to do). Is your
 socket set to non-blocking?

-- 
Ticket URL: https://trac.libssh2.org/ticket/275#comment:1
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


[libssh2] #276: do not fail when keys of unknown type are read from known_hosts file

2013-10-04 Thread libssh2 Trac
#276: do not fail when keys of unknown type are read from known_hosts file
+
 Reporter:  salva   |   Owner:
 Type:  defect  |  Status:  new
 Priority:  normal  |   Milestone:  1.4.3
Component:  misc| Version:  1.4.2
 Keywords:  |  Blocked By:
   Blocks:  |
+
 Currently, when `libssh2_knownhost_readfile` finds a key of a type not
 natively supported by the library, it stops reading and returns an error.

 This is very annoying as OpenSSH uses other key types and so its
 known_host can not be used. Even worse, if the programmer is sloppy, and
 doesn't check for errors when calling `libssh2_knownhost_readfile` and
 later saves the file, it will wipe out any entries after the unsupported
 one.

 The attached patch solves that issue.

 Commit log follows:

 {{{
 store but don't use keys of unsupported types on the known_hosts
 file.

 Currently, when libssh2 parses a known_host file containing keys
 of some type it doesn't natively support, it stops reading the
  file and returns an error.

 That means, that the known_host file can not be safely shared
 with other software supporting other key types (i.e. OpenSSH).

 This patch adds support for handling keys of unknown type. It can
 read and write them, even if they are never going to be matched.

 At the source level the patch does the following things:

 - add a new unknown key type LIBSSH2_KNOWNHOST_KEY_UNKNOWN

 - add a new slot (key_type_name) on the known_host struct that is
 used to store the key type in ascii form when it is not supported

 - parse correctly known_hosts entries with unknown key types and
 populate the key_type_name slot

 - print correctly known_hosts entries of unknown type

 - when checking a host key ignore keys that do not match the key
 type
 }}}

-- 
Ticket URL: https://trac.libssh2.org/ticket/276
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


[libssh2] #274: ssh agent cannot be shared between sessions

2013-10-04 Thread libssh2 Trac
#274: ssh agent cannot be shared between sessions
-+
 Reporter:  ccutrer  |   Owner:
 Type:  enhancement  |  Status:  new
 Priority:  normal   |   Milestone:  1.4.3
Component:  API  | Version:  1.4.2
 Keywords:   |  Blocked By:
   Blocks:   |
-+
 besides accessing a session for the alloc/free callbacks, only the actual
 userauth method needs a session. I propose an userauth_ex method that
 takes a session as an argument, so that a single agent connection can be
 shared if you're making many connections (think a dsh or parallel-scp
 replacement).

 for now I've worked around this by jsut overwriting the session field in
 LIBSSH2_AGENT before calling userauth, and it's working great.

-- 
Ticket URL: https://trac.libssh2.org/ticket/274
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


[libssh2] #271: Query on libssh2_session_set_timeout

2013-09-07 Thread libssh2 Trac
#271: Query on libssh2_session_set_timeout
---+
 Reporter:  ganga bhavani  |   Owner:
 Type:  optimization   |  Status:  new
 Priority:  low|   Milestone:  1.4.3
Component:  examples   | Version:  1.4.2
 Keywords: |  Blocked By:
   Blocks: |
---+
 Hi,

 Can any one help me in understanding what exactly the
 libssh2_session_set_timeout API call will do. As per the libssh2 docs , I
 read it as used to set timeout for blocking functions. But I could able to
 understand whether this will set timeout for only the API above which this
 libssh2_session_set_timeout  is set or it will set timeout on entire
 session and thus this timeout will be effected to all the API's used with
 that session.

 I am new to libssh2. So please help me in understanding the usage.

 It would be more helpful, if I can get a sample program to use this
 libssh2_session_set_timeout((LIBSSH2_SESSION *session, long timeout); API.

 Thanking you in advance.
 GB

-- 
Ticket URL: https://trac.libssh2.org/ticket/271
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #271: Query on libssh2_session_set_timeout

2013-09-07 Thread libssh2 Trac
#271: Query on libssh2_session_set_timeout
+
  Reporter:  ganga bhavani  |  Owner:
  Type:  optimization   | Status:  closed
  Priority:  low|  Milestone:  1.4.3
 Component:  examples   |Version:  1.4.2
Resolution:  invalid|   Keywords:
Blocked By: | Blocks:
+
Changes (by bagder):

 * status:  new = closed
 * resolution:   = invalid


Comment:

 Please don't abuse the bug tracker for support and help questions. Use the
 libssh2-devel mailing list for that.

-- 
Ticket URL: https://trac.libssh2.org/ticket/271#comment:1
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #246: libssh2_session_free does not release channels

2013-09-07 Thread libssh2 Trac
#246: libssh2_session_free does not release channels
---+
  Reporter:  maxmtl|  Owner:
  Type:  defect| Status:  closed
  Priority:  normal|  Milestone:  1.4.3
 Component:  protocol  |Version:  1.4.2
Resolution:  fixed |   Keywords:
Blocked By:| Blocks:
---+
Changes (by bagder):

 * status:  new = closed
 * resolution:   = fixed


-- 
Ticket URL: https://trac.libssh2.org/ticket/246#comment:1
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #259: [PATCH] _libssh2_packet_add sends uninitialized data

2013-09-07 Thread libssh2 Trac
#259: [PATCH] _libssh2_packet_add sends uninitialized data
-+
  Reporter:  ncm |  Owner:  bagder
  Type:  defect  | Status:  closed
  Priority:  normal  |  Milestone:  1.4.3
 Component:  misc|Version:  1.4.2
Resolution:  fixed   |   Keywords:
Blocked By:  | Blocks:
-+
Changes (by bagder):

 * owner:   = bagder
 * status:  new = closed
 * resolution:   = fixed


Comment:

 In [changeset:8da30ea4d4f6269ffbf1b365098f63c1c9971669/libssh2]:
 {{{
 #!CommitTicketReference repository=libssh2
 revision=8da30ea4d4f6269ffbf1b365098f63c1c9971669
 _libssh2_packet_add: avoid using uninitialized memory

 In _libssh2_packet_add, called by _libssh2_packet_read, a call to
 _libssh2_packet_send that is supposed to send a one-byte message
 SSH_MSG_REQUEST_FAILURE would send an uninitialized byte upon re-entry
 if its call to _send returns _EAGAIN.

 Fixes #259
 }}}

-- 
Ticket URL: https://trac.libssh2.org/ticket/259#comment:2
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #270: libssh2_sftp_stat_ex hanged

2013-09-05 Thread libssh2 Trac
#270: libssh2_sftp_stat_ex hanged
+---
  Reporter:  ganga bhavani  |  Owner:
  Type:  defect | Status:  new
  Priority:  high   |  Milestone:  1.4.3
 Component:  SFTP   |Version:  1.2.9
Resolution: |   Keywords:
Blocked By: | Blocks:
+---

Comment (by bagder):

 We've done numerous bug fixes after the 1.2.9 release so it makes sense if
 you first try out version 1.4.3 and if the problem remains post us a
 little code snippet we can use to repeat the problem.

-- 
Ticket URL: https://trac.libssh2.org/ticket/270#comment:2
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


Re: [libssh2] #270: libssh2_sftp_stat_ex hanged

2013-09-05 Thread libssh2 Trac
#270: libssh2_sftp_stat_ex hanged
+---
  Reporter:  ganga bhavani  |  Owner:
  Type:  defect | Status:  new
  Priority:  high   |  Milestone:  1.4.3
 Component:  SFTP   |Version:  1.2.9
Resolution: |   Keywords:
Blocked By: | Blocks:
+---

Comment (by ganga bhavani):

 I can post the relevant part of the code if required.

-- 
Ticket URL: https://trac.libssh2.org/ticket/270#comment:1
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


[libssh2] #270: libssh2_sftp_stat_ex hanged

2013-09-05 Thread libssh2 Trac
#270: libssh2_sftp_stat_ex hanged
---+
 Reporter:  ganga bhavani  |   Owner:
 Type:  defect |  Status:  new
 Priority:  high   |   Milestone:  1.4.3
Component:  SFTP   | Version:  1.2.9
 Keywords: |  Blocked By:
   Blocks: |
---+
 We are using libssh2 protocol to initiate SFTP transfer while sending
 files to remote server.
 In stability tests where traffic is flowing we observed that one file got
 stuck in sending.

 At this point, we have collected the gstack and observed that the hang is
 there in libssh2_sftp_stat_ex API as shown below

 Thread 5 (Thread 0x7f5c6bff7700 (LWP 29770)):
 #0  0x7f5c7a2c0786 in poll () from /lib64/libc.so.6
 #1  0x7f5c7abf81f7 in ?? () from /usr/lib64/libssh2.so.1
 #2  0x7f5c7abfb9b2 in libssh2_sftp_stat_ex () from
 /usr/lib64/libssh2.so.1
 #3  0x004f4fc9 in SftpAdapterClass::sendFile1(void*, std::string,
 std::string, bool) ()

 The libssh2 library we are using here is libssh2-1-1.2.9-4.2.2.1.

 Please help me in analyzing what could be the reason for
 libssh2_sftp_stat_ex  to get hang.

 In the Feature update for libssh2 for this libssh2-1-1.2.9-4.2.2.1
 release , it is written

 In addition to that some problems were fixed, including a
  possible application hang when waiting for a remote server
  to return the results of a command.

 So we feel that hangs occurred while using some of the libssh2 API's are
 addressed in this release.

 So can you let us know whether the hang in libssh2_sftp_stat_ex  is
 addressed in libssh2-1-1.2.9-4.2.2.1 release.
 Or is there any other later release which has fixed up the hangs that are
 occurring in libssh2 API calls.

 Thanking you in Advance.

-- 
Ticket URL: https://trac.libssh2.org/ticket/270
libssh2 https://trac.libssh2.org/
C library for writing portable SSH2 clients

___
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


  1   2   3   4   5   >