From libssh2-devel-bounces@cool.haxx.se  Wed Sep  1 01:06:56 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o7VN6bVZ022028;
	Wed, 1 Sep 2010 01:06:53 +0200
Received: from m1.imap-partners.net (m1.imap-partners.net [64.13.152.131])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o7VN6X1v022009
	for <libssh2-devel@cool.haxx.se>; Wed, 1 Sep 2010 01:06:35 +0200
Received: from familiar.netflix.com (lg-nat.corp.netflix.com [208.75.77.65])
	by m1.imap-partners.net (MOS 4.1.8-GA)
	with ESMTP id CCP73411 (AUTH via LOGINBEFORESMTP);
	Tue, 31 Aug 2010 16:06:25 -0700
X-Mirapoint-Received-SPF: 208.75.77.65 familiar.netflix.com <tj@castaglia.org>
	5 none
Date: Tue, 31 Aug 2010 16:03:49 -0700 (PDT)
From: TJ Saunders <tj@castaglia.org>
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: SFTP Compression support
In-Reply-To: <alpine.DEB.2.00.1008311334090.30072@familiar.castaglia.org>
Message-ID: <alpine.DEB.2.00.1008311556050.30072@familiar.castaglia.org>
References: <4C77124D.3060909@barcelona04.com>
	<alpine.DEB.2.00.1008272001280.5635@tvnag.unkk.fr>
	<4C784D9E.9070804@barcelona04.com>
	<alpine.DEB.2.00.1008311334090.30072@familiar.castaglia.org>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
MIME-Version: 1.0
Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-20371714-1283295830=:30072"
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Wed, 01 Sep 2010 01:06:56 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Wed, 01 Sep 2010 01:06:35 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

--8323328-20371714-1283295830=:30072
Content-Type: TEXT/PLAIN; charset=US-ASCII


> [libssh2] 2.676521 Failure Event: -29 - compress/decompression failure
> [libssh2] 2.676537 Failure Event: -1 - transport read
> [libssh2] 2.676547 Failure Event: -21 - Read part of packet
> [libssh2] 2.676558 Failure Event: -1 - Timeout waiting for status message
> 
> And there, I think, is a sign of the issue:
> 
>   [libssh2] 2.676521 Failure Event: -29 - compress/decompression failure
> 
> The question is, though: why did the decompression fail?  And why does it 
> fail at this point, when reading file data (as opposed to earlier, when 
> decompressing the rest of the messages on that subsystem/channel)?
> 
> I'll keep poking at this to see if I can find any additional clues...

I patched the src/comp.c file (see first attached patch) to try to get 
more information; in my particular use case, I saw:

  [libssh2] 3.316516 Transport: unhandled zlib error -5

According to the zlib.h header, a return value of -5 is Z_BUF_ERROR, which 
indicates (in the case of calling the inflate() zlib function) that there 
isn't enough space in the output buffer for the decompressor to make any 
progress.

That being the case, I tried increasing the size of the output buffers 
used for zlib decompression (see second attached patch), and things looked 
much better.  I'm not sure of just what the best increase in output buffer 
sizes/growth factors should be, though.

Cheers,
TJ

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   We are ashamed of everything that is real about us; ashamed of
   ourselves, of our relatives, of our incomes, of our accents, of
   our opinions, of our experience, just as we are ashamed of our
   naked skins.

   	-George Bernard Shaw

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--8323328-20371714-1283295830=:30072
Content-Type: TEXT/x-diff; name=libssh2-comp-debug.patch
Content-Transfer-Encoding: BASE64
Content-ID: <alpine.DEB.2.00.1008311603490.30072@familiar.castaglia.org>
Content-Description: 
Content-Disposition: attachment; filename=libssh2-comp-debug.patch

LS0tIHNyYy9jb21wLmMub3JpZwkyMDEwLTA4LTMxIDE1OjU1OjM4LjAwMDAw
MDAwMCAtMDcwMA0KKysrIHNyYy9jb21wLmMJMjAxMC0wOC0zMSAxNTo1NDo0
My4wMDAwMDAwMDAgLTA3MDANCkBAIC0yMDgsNiArMjA4LDggQEANCiAgICAg
ICAgIH0NCiAgICAgICAgIGlmIChzdGF0dXMgIT0gWl9PSykgew0KICAgICAg
ICAgICAgIExJQlNTSDJfRlJFRShzZXNzaW9uLCBvdXQpOw0KKyAgICAgICAg
ICAgIF9saWJzc2gyX2RlYnVnKHNlc3Npb24sIExJQlNTSDJfVFJBQ0VfVFJB
TlMsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgInVuaGFuZGxlZCB6
bGliIGVycm9yICVkIiwgc3RhdHVzKTsNCiAgICAgICAgICAgICByZXR1cm4g
X2xpYnNzaDJfZXJyb3Ioc2Vzc2lvbiwgTElCU1NIMl9FUlJPUl9aTElCLA0K
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiY29tcHJlc3Mv
ZGVjb21wcmVzc2lvbiBmYWlsdXJlIik7DQogICAgICAgICB9DQpAQCAtMjc2
LDYgKzI3OCw4IEBADQogICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAg
ICAgICAgaWYgKHN0YXR1cyAhPSBaX09LKSB7DQogICAgICAgICAgICAgICAg
ICAgICBMSUJTU0gyX0ZSRUUoc2Vzc2lvbiwgb3V0KTsNCisgICAgICAgICAg
ICAgICAgICAgIF9saWJzc2gyX2RlYnVnKHNlc3Npb24sIExJQlNTSDJfVFJB
Q0VfVFJBTlMsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAidW5oYW5kbGVkIHpsaWIgZXJyb3IgJWQiLCBzdGF0dXMpOw0KICAgICAg
ICAgICAgICAgICAgICAgcmV0dXJuIF9saWJzc2gyX2Vycm9yKHNlc3Npb24s
IExJQlNTSDJfRVJST1JfWkxJQiwNCiAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAiY29tcHJlc3MvZGVjb21wcmVzc2lvbiBm
YWlsdXJlIik7DQogICAgICAgICAgICAgICAgIH0NCg==

--8323328-20371714-1283295830=:30072
Content-Type: TEXT/x-diff; name=libssh2-comp-debug-2.patch
Content-Transfer-Encoding: BASE64
Content-ID: <alpine.DEB.2.00.1008311603491.30072@familiar.castaglia.org>
Content-Description: 
Content-Disposition: attachment; filename=libssh2-comp-debug-2.patch

LS0tIHNyYy9jb21wLmMub3JpZwkyMDEwLTA4LTMxIDE1OjU1OjM4LjAwMDAw
MDAwMCAtMDcwMA0KKysrIHNyYy9jb21wLmMJMjAxMC0wOC0zMSAxNjowMDox
Mi4wMDAwMDAwMDAgLTA3MDANCkBAIC0xNjcsNyArMTY3LDcgQEANCiAgICAg
LyogQSBzaG9ydC10ZXJtIGFsbG9jIG9mIGEgZnVsbCBkYXRhIGNodW5rIGlz
IGJldHRlciB0aGFuIGEgc2VyaWVzIG9mDQogICAgICAgIHJlYWxsb2NzICov
DQogICAgIGNoYXIgKm91dDsNCi0gICAgaW50IG91dF9tYXhsZW4gPSBjb21w
cmVzcyA/IChzcmNfbGVuICsgNCkgOiAoMiAqIHNyY19sZW4pOw0KKyAgICBp
bnQgb3V0X21heGxlbiA9IGNvbXByZXNzID8gKHNyY19sZW4gKyA0KSA6ICg4
ICogc3JjX2xlbik7DQogICAgIGludCBsaW1pdGVyID0gMDsNCiANCiAgICAg
LyogSWYgc3RybSBpcyBudWxsLCB0aGVuIHdlIGhhdmUgbm90IHlldCBiZWVu
IGluaXRpYWxpemVkLiAqLw0KQEAgLTIwOCw2ICsyMDgsOCBAQA0KICAgICAg
ICAgfQ0KICAgICAgICAgaWYgKHN0YXR1cyAhPSBaX09LKSB7DQogICAgICAg
ICAgICAgTElCU1NIMl9GUkVFKHNlc3Npb24sIG91dCk7DQorICAgICAgICAg
ICAgX2xpYnNzaDJfZGVidWcoc2Vzc2lvbiwgTElCU1NIMl9UUkFDRV9UUkFO
UywNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAidW5oYW5kbGVkIHps
aWIgZXJyb3IgJWQiLCBzdGF0dXMpOw0KICAgICAgICAgICAgIHJldHVybiBf
bGlic3NoMl9lcnJvcihzZXNzaW9uLCBMSUJTU0gyX0VSUk9SX1pMSUIsDQog
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJjb21wcmVzcy9k
ZWNvbXByZXNzaW9uIGZhaWx1cmUiKTsNCiAgICAgICAgIH0NCkBAIC0yMTYs
NyArMjE4LDcgQEANCiAgICAgICAgICAgICBjaGFyICpuZXdvdXQ7DQogDQog
ICAgICAgICAgICAgb3V0X21heGxlbiArPQ0KLSAgICAgICAgICAgICAgICBj
b21wcmVzcyA/IChzdHJtLT5hdmFpbF9pbiArIDQpIDogKDIgKiBzdHJtLT5h
dmFpbF9pbik7DQorICAgICAgICAgICAgICAgIGNvbXByZXNzID8gKHN0cm0t
PmF2YWlsX2luICsgNCkgOiAoOCAqIHN0cm0tPmF2YWlsX2luKTsNCiANCiAg
ICAgICAgICAgICBpZiAoKG91dF9tYXhsZW4gPiAoaW50KSBwYXlsb2FkX2xp
bWl0KSAmJiAhY29tcHJlc3MgJiYgbGltaXRlcisrKSB7DQogICAgICAgICAg
ICAgICAgIExJQlNTSDJfRlJFRShzZXNzaW9uLCBvdXQpOw0KQEAgLTIzNCwx
NCArMjM2LDE0IEBADQogICAgICAgICAgICAgb3V0ID0gbmV3b3V0Ow0KICAg
ICAgICAgICAgIHN0cm0tPm5leHRfb3V0ID0gKHVuc2lnbmVkIGNoYXIgKikg
b3V0ICsgb3V0X29mczsNCiAgICAgICAgICAgICBzdHJtLT5hdmFpbF9vdXQg
Kz0NCi0gICAgICAgICAgICAgICAgY29tcHJlc3MgPyAoc3RybS0+YXZhaWxf
aW4gKyA0KSA6ICgyICogc3RybS0+YXZhaWxfaW4pOw0KKyAgICAgICAgICAg
ICAgICBjb21wcmVzcyA/IChzdHJtLT5hdmFpbF9pbiArIDQpIDogKDggKiBz
dHJtLT5hdmFpbF9pbik7DQogICAgICAgICB9IGVsc2UNCiAgICAgICAgICAg
ICB3aGlsZSAoIXN0cm0tPmF2YWlsX291dCkgew0KICAgICAgICAgICAgICAg
ICAvKiBEb25lIHdpdGggaW5wdXQsIG1pZ2h0IGJlIGEgYnl0ZSBvciB0d28g
aW4gaW50ZXJuYWwgYnVmZmVyDQogICAgICAgICAgICAgICAgICAqIGR1cmlu
ZyBjb21wcmVzcy4gIE9yIHBvdGVudGlhbGx5IG1hbnkgYnl0ZXMgaWYgaXQn
cyBhDQogICAgICAgICAgICAgICAgICAqIGRlY29tcHJlc3MNCiAgICAgICAg
ICAgICAgICAgICovDQotICAgICAgICAgICAgICAgIGludCBncm93X3NpemUg
PSBjb21wcmVzcyA/IDggOiAxMDI0Ow0KKyAgICAgICAgICAgICAgICBpbnQg
Z3Jvd19zaXplID0gY29tcHJlc3MgPyA4IDogMjA0ODsNCiAgICAgICAgICAg
ICAgICAgY2hhciAqbmV3b3V0Ow0KIA0KICAgICAgICAgICAgICAgICBpZiAo
b3V0X21heGxlbiA+PSAoaW50KSBwYXlsb2FkX2xpbWl0KSB7DQpAQCAtMjc2
LDYgKzI3OCw4IEBADQogICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAg
ICAgICAgaWYgKHN0YXR1cyAhPSBaX09LKSB7DQogICAgICAgICAgICAgICAg
ICAgICBMSUJTU0gyX0ZSRUUoc2Vzc2lvbiwgb3V0KTsNCisgICAgICAgICAg
ICAgICAgICAgIF9saWJzc2gyX2RlYnVnKHNlc3Npb24sIExJQlNTSDJfVFJB
Q0VfVFJBTlMsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAidW5oYW5kbGVkIHpsaWIgZXJyb3IgJWQiLCBzdGF0dXMpOw0KICAgICAg
ICAgICAgICAgICAgICAgcmV0dXJuIF9saWJzc2gyX2Vycm9yKHNlc3Npb24s
IExJQlNTSDJfRVJST1JfWkxJQiwNCiAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAiY29tcHJlc3MvZGVjb21wcmVzc2lvbiBm
YWlsdXJlIik7DQogICAgICAgICAgICAgICAgIH0NCg==

--8323328-20371714-1283295830=:30072
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--8323328-20371714-1283295830=:30072--

From libssh2-devel-bounces@cool.haxx.se  Wed Sep  1 05:55:45 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o813tGJ7022034;
	Wed, 1 Sep 2010 05:55:41 +0200
Received: from mail2.barcelona04.com (mx2.barcelona04.com [190.139.108.163])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o813tCqa021825
	for <libssh2-devel@cool.haxx.se>; Wed, 1 Sep 2010 05:55:13 +0200
X-Spam-Status: No, hits=0.0 required=4.0
	tests=AWL: 0.575,BAYES_00: -1.665,HTML_MESSAGE: 0.001,
	CUSTOM_RULE_FROM: ALLOW,TOTAL_SCORE: -1.089,autolearn=ham
X-Spam-Level: 
Received: from localhost ([127.0.0.1]) by mail2.barcelona04.com
	for libssh2-devel@cool.haxx.se; Wed, 1 Sep 2010 00:27:08 -0300
Message-ID: <4C7DC742.70309@barcelona04.com>
Date: Wed, 01 Sep 2010 00:23:46 -0300
From: Ezequiel Ruiz <eruiz@barcelona04.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; es-AR;
	rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2
MIME-Version: 1.0
To: libssh2-devel@cool.haxx.se
Subject: Re: SFTP Compression support
References: <4C77124D.3060909@barcelona04.com>	<alpine.DEB.2.00.1008272001280.5635@tvnag.unkk.fr>	<4C784D9E.9070804@barcelona04.com>	<alpine.DEB.2.00.1008311334090.30072@familiar.castaglia.org>
	<alpine.DEB.2.00.1008311556050.30072@familiar.castaglia.org>
In-Reply-To: <alpine.DEB.2.00.1008311556050.30072@familiar.castaglia.org>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Wed, 01 Sep 2010 05:55:44 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Wed, 01 Sep 2010 05:55:14 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0026860680=="
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

This is a multi-part message in MIME format.
--===============0026860680==
Content-Type: multipart/alternative;
 boundary="------------000402050701080100040306"

This is a multi-part message in MIME format.
--------------000402050701080100040306
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

  It seams you find the problem, I'll try your patch and give you some 
feedback.
Thanks a lot for your research, nice job!

Regards,

Ezequiel

El 31/08/2010 08:03 p.m., TJ Saunders escribió:
>> [libssh2] 2.676521 Failure Event: -29 - compress/decompression failure
>> [libssh2] 2.676537 Failure Event: -1 - transport read
>> [libssh2] 2.676547 Failure Event: -21 - Read part of packet
>> [libssh2] 2.676558 Failure Event: -1 - Timeout waiting for status message
>>
>> And there, I think, is a sign of the issue:
>>
>>    [libssh2] 2.676521 Failure Event: -29 - compress/decompression failure
>>
>> The question is, though: why did the decompression fail?  And why does it
>> fail at this point, when reading file data (as opposed to earlier, when
>> decompressing the rest of the messages on that subsystem/channel)?
>>
>> I'll keep poking at this to see if I can find any additional clues...
> I patched the src/comp.c file (see first attached patch) to try to get
> more information; in my particular use case, I saw:
>
>    [libssh2] 3.316516 Transport: unhandled zlib error -5
>
> According to the zlib.h header, a return value of -5 is Z_BUF_ERROR, which
> indicates (in the case of calling the inflate() zlib function) that there
> isn't enough space in the output buffer for the decompressor to make any
> progress.
>
> That being the case, I tried increasing the size of the output buffers
> used for zlib decompression (see second attached patch), and things looked
> much better.  I'm not sure of just what the best increase in output buffer
> sizes/growth factors should be, though.
>
> Cheers,
> TJ
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>     We are ashamed of everything that is real about us; ashamed of
>     ourselves, of our relatives, of our incomes, of our accents, of
>     our opinions, of our experience, just as we are ashamed of our
>     naked skins.
>
>     	-George Bernard Shaw
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


--------------000402050701080100040306
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    <title></title>
  </head>
  <body bgcolor="#ffffff" text="#000000">
    It seams you find the problem, I'll try your patch and give you some
    feedback.<br>
    Thanks a lot for your research, nice job!<br>
    <br>
    Regards,<br>
    <br>
    Ezequiel<br>
    <br>
    El 31/08/2010 08:03 p.m., TJ Saunders escribi&oacute;:
    <blockquote
      cite="mid:alpine.DEB.2.00.1008311556050.30072@familiar.castaglia.org"
      type="cite">
      <pre wrap="">
</pre>
      <blockquote type="cite">
        <pre wrap="">[libssh2] 2.676521 Failure Event: -29 - compress/decompression failure
[libssh2] 2.676537 Failure Event: -1 - transport read
[libssh2] 2.676547 Failure Event: -21 - Read part of packet
[libssh2] 2.676558 Failure Event: -1 - Timeout waiting for status message

And there, I think, is a sign of the issue:

  [libssh2] 2.676521 Failure Event: -29 - compress/decompression failure

The question is, though: why did the decompression fail?  And why does it 
fail at this point, when reading file data (as opposed to earlier, when 
decompressing the rest of the messages on that subsystem/channel)?

I'll keep poking at this to see if I can find any additional clues...
</pre>
      </blockquote>
      <pre wrap="">
I patched the src/comp.c file (see first attached patch) to try to get 
more information; in my particular use case, I saw:

  [libssh2] 3.316516 Transport: unhandled zlib error -5

According to the zlib.h header, a return value of -5 is Z_BUF_ERROR, which 
indicates (in the case of calling the inflate() zlib function) that there 
isn't enough space in the output buffer for the decompressor to make any 
progress.

That being the case, I tried increasing the size of the output buffers 
used for zlib decompression (see second attached patch), and things looked 
much better.  I'm not sure of just what the best increase in output buffer 
sizes/growth factors should be, though.

Cheers,
TJ

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   We are ashamed of everything that is real about us; ashamed of
   ourselves, of our relatives, of our incomes, of our accents, of
   our opinions, of our experience, just as we are ashamed of our
   naked skins.

   	-George Bernard Shaw

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</pre>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
libssh2-devel <a class="moz-txt-link-freetext" href="http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel">http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>

--------------000402050701080100040306--


--===============0026860680==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============0026860680==--

From libssh2-devel-bounces@cool.haxx.se  Wed Sep  1 17:08:19 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o81F7sp9019665;
	Wed, 1 Sep 2010 17:08:14 +0200
Received: from mail2.barcelona04.com (mx2.barcelona04.com [190.139.108.163])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o81F7UHT019595
	for <libssh2-devel@cool.haxx.se>; Wed, 1 Sep 2010 17:07:51 +0200
X-Spam-Status: No, hits=0.0 required=4.0
	tests=AWL: 0.431,BAYES_00: -1.665,HTML_MESSAGE: 0.001,
	CUSTOM_RULE_FROM: ALLOW,TOTAL_SCORE: -1.233,autolearn=ham
X-Spam-Level: 
Received: from localhost ([127.0.0.1]) by mail2.barcelona04.com
	for libssh2-devel@cool.haxx.se; Wed, 1 Sep 2010 12:00:06 -0300
Message-ID: <4C7E69BE.8010704@barcelona04.com>
Date: Wed, 01 Sep 2010 11:57:02 -0300
From: Ezequiel Ruiz <eruiz@barcelona04.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; es-AR;
	rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2
MIME-Version: 1.0
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: SFTP Compression support
References: <4C77124D.3060909@barcelona04.com>	<alpine.DEB.2.00.1008272001280.5635@tvnag.unkk.fr>	<4C784D9E.9070804@barcelona04.com>	<alpine.DEB.2.00.1008311334090.30072@familiar.castaglia.org>	<alpine.DEB.2.00.1008311556050.30072@familiar.castaglia.org>
	<4C7DC742.70309@barcelona04.com>
In-Reply-To: <4C7DC742.70309@barcelona04.com>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Wed, 01 Sep 2010 17:08:19 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Wed, 01 Sep 2010 17:07:52 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============1926572947=="
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

This is a multi-part message in MIME format.
--===============1926572947==
Content-Type: multipart/alternative;
 boundary="------------060706090604020705080804"

This is a multi-part message in MIME format.
--------------060706090604020705080804
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

  Ok, I've been testing the patch you sent me. It seems to solve the 
problem when opening files. But, unfortunately I'm getting confused with 
some strange behavior in one of my tests:

I've just compiled the "sftp_nonblock.c" example, and tried it with an 
80 MB text file in a remote Linux server. I've commented the line where 
the output is printed in the stdout to avoid performance penalties. The 
problem is that using the compression flag takes more time that without 
the using the compression flag! I've tried several times, and all the 
tests returned the same results: about 120 seconds with the compression 
flag, and about 90 seconds without it. I've tried with buffers of 1K, 
16K and 32K.
The compression is enabled at the OpenSSH server side, if I try the 
transfer with an SFTP client, like the sftp command, then it takes about 
10 or 20 seconds.

Ezequiel


El 01/09/2010 12:23 a.m., Ezequiel Ruiz escribió:
> It seams you find the problem, I'll try your patch and give you some 
> feedback.
> Thanks a lot for your research, nice job!
>
> Regards,
>
> Ezequiel
>
> El 31/08/2010 08:03 p.m., TJ Saunders escribió:
>>> [libssh2] 2.676521 Failure Event: -29 - compress/decompression failure
>>> [libssh2] 2.676537 Failure Event: -1 - transport read
>>> [libssh2] 2.676547 Failure Event: -21 - Read part of packet
>>> [libssh2] 2.676558 Failure Event: -1 - Timeout waiting for status message
>>>
>>> And there, I think, is a sign of the issue:
>>>
>>>    [libssh2] 2.676521 Failure Event: -29 - compress/decompression failure
>>>
>>> The question is, though: why did the decompression fail?  And why does it
>>> fail at this point, when reading file data (as opposed to earlier, when
>>> decompressing the rest of the messages on that subsystem/channel)?
>>>
>>> I'll keep poking at this to see if I can find any additional clues...
>> I patched the src/comp.c file (see first attached patch) to try to get
>> more information; in my particular use case, I saw:
>>
>>    [libssh2] 3.316516 Transport: unhandled zlib error -5
>>
>> According to the zlib.h header, a return value of -5 is Z_BUF_ERROR, which
>> indicates (in the case of calling the inflate() zlib function) that there
>> isn't enough space in the output buffer for the decompressor to make any
>> progress.
>>
>> That being the case, I tried increasing the size of the output buffers
>> used for zlib decompression (see second attached patch), and things looked
>> much better.  I'm not sure of just what the best increase in output buffer
>> sizes/growth factors should be, though.
>>
>> Cheers,
>> TJ
>>
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>>     We are ashamed of everything that is real about us; ashamed of
>>     ourselves, of our relatives, of our incomes, of our accents, of
>>     our opinions, of our experience, just as we are ashamed of our
>>     naked skins.
>>
>>     	-George Bernard Shaw
>>
>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>>
>> _______________________________________________
>> libssh2-develhttp://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
>
>
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


--------------060706090604020705080804
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    <title></title>
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Ok, I've been testing the patch you sent me. It seems to solve the
    problem when opening files. But, unfortunately I'm getting confused
    with some strange behavior in one of my tests:<br>
    <br>
    I've just compiled the "sftp_nonblock.c" example, and tried it with
    an 80 MB text file in a remote Linux server. I've commented the line
    where the output is printed in the stdout to avoid performance
    penalties. The problem is that using the compression flag takes more
    time that without the using the compression flag! I've tried several
    times, and all the tests returned the same results: about 120
    seconds with the compression flag, and about 90 seconds without it.
    I've tried with buffers of 1K, 16K and 32K.<br>
    The compression is enabled at the OpenSSH server side, if I try the
    transfer with an SFTP client, like the sftp command, then it takes
    about 10 or 20 seconds.<br>
    <br>
    Ezequiel<br>
    <br>
    <br>
    El 01/09/2010 12:23 a.m., Ezequiel Ruiz escribi&oacute;:
    <blockquote cite="mid:4C7DC742.70309@barcelona04.com" type="cite">
      <meta content="text/html; charset=ISO-8859-1"
        http-equiv="Content-Type">
      <title></title>
      It seams you find the problem, I'll try your patch and give you
      some feedback.<br>
      Thanks a lot for your research, nice job!<br>
      <br>
      Regards,<br>
      <br>
      Ezequiel<br>
      <br>
      El 31/08/2010 08:03 p.m., TJ Saunders escribi&oacute;:
      <blockquote
        cite="mid:alpine.DEB.2.00.1008311556050.30072@familiar.castaglia.org"
        type="cite">
        <blockquote type="cite">
          <pre wrap="">[libssh2] 2.676521 Failure Event: -29 - compress/decompression failure
[libssh2] 2.676537 Failure Event: -1 - transport read
[libssh2] 2.676547 Failure Event: -21 - Read part of packet
[libssh2] 2.676558 Failure Event: -1 - Timeout waiting for status message

And there, I think, is a sign of the issue:

  [libssh2] 2.676521 Failure Event: -29 - compress/decompression failure

The question is, though: why did the decompression fail?  And why does it 
fail at this point, when reading file data (as opposed to earlier, when 
decompressing the rest of the messages on that subsystem/channel)?

I'll keep poking at this to see if I can find any additional clues...
</pre>
        </blockquote>
        <pre wrap="">I patched the src/comp.c file (see first attached patch) to try to get 
more information; in my particular use case, I saw:

  [libssh2] 3.316516 Transport: unhandled zlib error -5

According to the zlib.h header, a return value of -5 is Z_BUF_ERROR, which 
indicates (in the case of calling the inflate() zlib function) that there 
isn't enough space in the output buffer for the decompressor to make any 
progress.

That being the case, I tried increasing the size of the output buffers 
used for zlib decompression (see second attached patch), and things looked 
much better.  I'm not sure of just what the best increase in output buffer 
sizes/growth factors should be, though.

Cheers,
TJ

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   We are ashamed of everything that is real about us; ashamed of
   ourselves, of our relatives, of our incomes, of our accents, of
   our opinions, of our experience, just as we are ashamed of our
   naked skins.

   	-George Bernard Shaw

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</pre>
        <pre wrap=""><fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
libssh2-devel <a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel">http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel</a>
</pre>
      </blockquote>
      <br>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
libssh2-devel <a class="moz-txt-link-freetext" href="http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel">http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>

--------------060706090604020705080804--


--===============1926572947==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============1926572947==--

From libssh2-devel-bounces@cool.haxx.se  Wed Sep  1 17:17:32 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o81FHPAA023812;
	Wed, 1 Sep 2010 17:17:31 +0200
Received: from yxa-v.extundo.com (yxa-v.extundo.com [83.241.177.39])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o81FHLOu023801
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Wed, 1 Sep 2010 17:17:24 +0200
Received: from mocca (c80-216-27-64.bredband.comhem.se [80.216.27.64])
	(authenticated bits=0)
	by yxa-v.extundo.com (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id
	o81FH5VR015506
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Wed, 1 Sep 2010 17:17:09 +0200
From: Simon Josefsson <simon@josefsson.org>
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: Thread safety issues
References: <1282839657.18286.4.camel@localhost>
	<000501cb46e7$567e7970$037b6c50$@com>
	<AANLkTik9TNTF_OrT1hXqRPoF6Uc=hdZYxwMbq-hwrOSL@mail.gmail.com>
	<alpine.DEB.2.00.1008301549010.20506@tvnag.unkk.fr>
	<1283201535.18729.59.camel@localhost>
	<alpine.DEB.2.00.1008302253220.19589@tvnag.unkk.fr>
	<1283206745.18729.70.camel@localhost>
	<87occjp69d.fsf@mocca.josefsson.org>
	<1283283836.18534.28.camel@localhost>
	<87occiimlp.fsf@mocca.josefsson.org>
	<1283287411.18534.56.camel@localhost>
	<87y6bmh59n.fsf@mocca.josefsson.org>
	<1283288569.18534.61.camel@localhost>
OpenPGP: id=B565716F; url=http://josefsson.org/key.txt
X-Hashcash: 1:22:100901:libssh2-devel@cool.haxx.se::Zux93h+kUNFVAKYm:FjH5
Date: Wed, 01 Sep 2010 17:17:02 +0200
In-Reply-To: <1283288569.18534.61.camel@localhost> (jmk@foofus.net's message
	of "Tue, 31 Aug 2010 16:02:49 -0500")
Message-ID: <878w3ljxxt.fsf@mocca.josefsson.org>
User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux)
MIME-Version: 1.0
X-Spam-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00,
	DATE_IN_FUTURE_96_XX,RDNS_DYNAMIC,SPF_FAIL autolearn=no version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on yxa-v.extundo.com
X-Virus-Scanned: clamav-milter 0.96.1 at yxa-v
X-Virus-Status: Clean
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Wed, 01 Sep 2010 17:17:32 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Wed, 01 Sep 2010 17:17:24 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

jmk <jmk@foofus.net> writes:

> On Tue, 2010-08-31 at 22:54 +0200, Simon Josefsson wrote:
>> It may be simpler to call libssh2_init globally before firing up any
>> threads.  Then you only need to supply mutexes to the crypto library.
>
> Not feasible given the current design of my application -- all SSH code
> is contained within a module, which can be loaded by one or more
> threads.

Ouch.  How does your application handle this for other libraries?  There
are many libraries out there that need global initialization.  So it may
make sense to consider making your application call a module-init
function before proceeding.  Of course, this is speaking just generally,
and there may be reasons why this isn't an option for you.

> The core application doesn't have any SSH specific code in it.
> Fortunately, calling libssh2_init() multiple times doesn't *appear* to
> be causing me any issues.

The code looks like this:

libssh2_init(int flags)
{
    if (_libssh2_initialized == 0 && !(flags & LIBSSH2_INIT_NO_CRYPTO)) {
        libssh2_crypto_init();
    }

    _libssh2_initialized++;
    _libssh2_init_flags |= flags;

    return 0;
}

So there IS a race condition if two threads call the function at the
same time and there is a thread switch between the '==' comparison and
the '++' operation.  But typically this won't happen.

Just make sure you call libssh2_exit as many times you call
libssh2_init, if you care at all about resource de-allocation.

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

From libssh2-devel-bounces@cool.haxx.se  Wed Sep  1 20:05:41 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o81I5O3N005100;
	Wed, 1 Sep 2010 20:05:38 +0200
Received: from shell.lmi.net (shell.lmi.net [66.117.140.246])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o81I5Jpg005012
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Wed, 1 Sep 2010 20:05:22 +0200
Received: from rcom-software.com (75-101-82-95.dsl2st.lmi.net [75.101.82.95])
	by shell.lmi.net (8.14.1/8.14.1) with ESMTP id o81I5EOi024648
	for <libssh2-devel@cool.haxx.se>; Wed, 1 Sep 2010 11:05:14 -0700 (PDT)
Message-ID: <4C7E95ED.F93D0814@rcom-software.com>
Date: Wed, 01 Sep 2010 11:05:33 -0700
From: Paul Romero <paulr@rcom-software.com>
Organization: RCOM Communications Software
X-Mailer: Mozilla 4.77 [en] (Win95; U)
X-Accept-Language: en,es,de-DE,fr-FR
MIME-Version: 1.0
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: Libssh2: Libgcrypt authentication failure
References: <4C70D8C0.4536FA68@rcom-software.com>
	<AANLkTimSAhpscwuQnBGxz-bpGi0RFDunBaurrpmxSBbc@mail.gmail.com>
	<87r5hqvabb.fsf@mocca.josefsson.org>
X-Scanned-By: MIMEDefang 2.37
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Wed, 01 Sep 2010 20:05:41 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Wed, 01 Sep 2010 20:05:22 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Hi Simon:

What version of PKCS is commonly used by SSH and SFTP
servers claiming RSA 2 conformance ?  I believe it is
version 11 or 12.

Best Regards,

Paul R.

Simon Josefsson wrote:

> Alexander Lamaison <swish@lammy.co.uk> writes:
>
> > On 22 August 2010 08:58, Paul Romero <paulr@rcom-software.com> wrote:
> >>
> >> I am experiencing a problem with libssh2 version 1.2.6 which
> >> I don't understand. The symptoms are described below and suggest
> >> the problem is specific to libgcrypt. Any insight about the
> >> problem would be greatly appreciated
> > ...
> >>    const char *username="paulr"; /* System Must stripped */
> >>    const char *password="secret_agent";
> >>    const char *loclfile="sftp_write_nonblock.c";
> > ...
> >> while ((rc = libssh2_userauth_publickey_fromfile(session, username,
> >>        "/home/paulr/.ssh/id_rsa.pub",
> >>        "/home/paulr/.ssh/id_rsa",
> >>        password)) == LIBSSH2_ERROR_EAGAIN);
> >
> > I vaguely remember someone saying that libgcrypt can't handle a
> > private key with a passphrase.  Is this true or am I making things up?
>
> It is true.  The Libgcrypt backend in libssh2 contains a hand written
> slimmed down ASN.1 parser to read out the RSA key, but it does not
> support any of the PKCS* encrypted forms of RSA keys.  The OpenSSL
> backend in libssh2 uses OpenSSL to read the keys, so it supports
> whatever private key formats that OpenSSL supports.
>
> /Simon
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

--
Paul Romero

RCOM Communications Software

Phone/Fax: (510)339-2628
E-Mail: paulr@rcom-software.com


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

From libssh2-devel-bounces@cool.haxx.se  Wed Sep  1 20:37:57 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o81Ibgnm023426;
	Wed, 1 Sep 2010 20:37:54 +0200
Received: from m1.imap-partners.net (m1.imap-partners.net [64.13.152.131])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o81Ibdk6023417
	for <libssh2-devel@cool.haxx.se>; Wed, 1 Sep 2010 20:37:41 +0200
Received: from familiar.netflix.com (lg-nat.corp.netflix.com [208.75.77.65])
	by m1.imap-partners.net (MOS 4.1.8-GA)
	with ESMTP id CCR63750 (AUTH via LOGINBEFORESMTP);
	Wed, 1 Sep 2010 11:37:33 -0700
X-Mirapoint-Received-SPF: 208.75.77.65 familiar.netflix.com <tj@castaglia.org>
	5 none
Date: Wed, 1 Sep 2010 11:34:56 -0700 (PDT)
From: TJ Saunders <tj@castaglia.org>
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: SFTP Compression support
In-Reply-To: <4C7E69BE.8010704@barcelona04.com>
Message-ID: <alpine.DEB.2.00.1009011129220.30072@familiar.castaglia.org>
References: <4C77124D.3060909@barcelona04.com>
	<alpine.DEB.2.00.1008272001280.5635@tvnag.unkk.fr>
	<4C784D9E.9070804@barcelona04.com>
	<alpine.DEB.2.00.1008311334090.30072@familiar.castaglia.org>
	<alpine.DEB.2.00.1008311556050.30072@familiar.castaglia.org>
	<4C7DC742.70309@barcelona04.com> <4C7E69BE.8010704@barcelona04.com>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
MIME-Version: 1.0
Content-ID: <alpine.DEB.2.00.1009011134401.30072@familiar.castaglia.org>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Wed, 01 Sep 2010 20:37:57 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Wed, 01 Sep 2010 20:37:41 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se


> I've just compiled the "sftp_nonblock.c" example, and tried it with an 80 MB
> text file in a remote Linux server. I've commented the line where the output
> is printed in the stdout to avoid performance penalties. The problem is that
> using the compression flag takes more time that without the using the
> compression flag! I've tried several times, and all the tests returned the
> same results: about 120 seconds with the compression flag, and about 90
> seconds without it.

Can you use profiling, like ltrace or strace or something similar, to get 
a better idea of where that extra time is being spent?

> I've tried with buffers of 1K, 16K and 32K.

Are these buffers used for the size of the SSH packet payloads, or for the 
decompression?

> The compression is enabled at the OpenSSH server side, if I try the transfer
> with an SFTP client, like the sftp command, then it takes about 10 or 20
> seconds.

Another possibility is the size of the channel window that libssh2 uses.  
libssh2 has a channel window size of 64K (LIBSSH2_CHANNEL_WINDOW_DEFAULT, 
from libssh2.h); OpenSSH (at least looking at the 5.2p1 sources I have 
handy) shows a channel window size of 2048K.  A smaller window size 
results in more back-and-forth traffic; you might try increasing 
LIBSSH2_CHANNEL_WINDOW_DEFAULT to see if that affects your tests.

Cheers,
TJ

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

   Where is the Life we have lost in living?
   Where is the wisdom we have lost in knowledge?
   Where is the knowledge we have lost in information?

     -T.S. Eliot

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

From libssh2-devel-bounces@cool.haxx.se  Wed Sep  1 21:59:00 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o81JwfIB003880;
	Wed, 1 Sep 2010 21:58:59 +0200
Received: from mail2.barcelona04.com (mx2.barcelona04.com [190.139.108.163])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o81Jwc5C003872
	for <libssh2-devel@cool.haxx.se>; Wed, 1 Sep 2010 21:58:39 +0200
X-Spam-Status: No, hits=0.0 required=4.0
	tests=AWL: 0.345,BAYES_00: -1.665,CUSTOM_RULE_FROM: ALLOW,
	TOTAL_SCORE: -1.320,autolearn=ham
X-Spam-Level: 
Received: from localhost ([127.0.0.1]) by mail2.barcelona04.com
	for libssh2-devel@cool.haxx.se; Wed, 1 Sep 2010 16:35:58 -0300
Message-ID: <4C7EAA68.400@barcelona04.com>
Date: Wed, 01 Sep 2010 16:32:56 -0300
From: Ezequiel Ruiz <eruiz@barcelona04.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; es-AR;
	rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2
MIME-Version: 1.0
To: libssh2-devel@cool.haxx.se
Subject: Re: SFTP Compression support
References: <4C77124D.3060909@barcelona04.com>	<alpine.DEB.2.00.1008272001280.5635@tvnag.unkk.fr>	<4C784D9E.9070804@barcelona04.com>	<alpine.DEB.2.00.1008311334090.30072@familiar.castaglia.org>	<alpine.DEB.2.00.1008311556050.30072@familiar.castaglia.org>	<4C7DC742.70309@barcelona04.com>
	<4C7E69BE.8010704@barcelona04.com>
	<alpine.DEB.2.00.1009011129220.30072@familiar.castaglia.org>
In-Reply-To: <alpine.DEB.2.00.1009011129220.30072@familiar.castaglia.org>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Wed, 01 Sep 2010 21:59:00 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Wed, 01 Sep 2010 21:58:40 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

  The buffer values I've mentioned where just for the SSH packet =

payloads, I didn't touch the decompression buffers (just applied your =

patch). Regarding the profiler, I'll make some tests this night, I'm not =

sure if increasing the LIBSSH2_CHANNEL_WINDOW_DEFAULT value will affect =

the performance, but I'll try it too.

Regards,

Ezequiel

El 01/09/2010 03:34 p.m., TJ Saunders escribi=F3:
>> I've just compiled the "sftp_nonblock.c" example, and tried it with an 8=
0 MB
>> text file in a remote Linux server. I've commented the line where the ou=
tput
>> is printed in the stdout to avoid performance penalties. The problem is =
that
>> using the compression flag takes more time that without the using the
>> compression flag! I've tried several times, and all the tests returned t=
he
>> same results: about 120 seconds with the compression flag, and about 90
>> seconds without it.
> Can you use profiling, like ltrace or strace or something similar, to get
> a better idea of where that extra time is being spent?
>
>> I've tried with buffers of 1K, 16K and 32K.
> Are these buffers used for the size of the SSH packet payloads, or for the
> decompression?
>
>> The compression is enabled at the OpenSSH server side, if I try the tran=
sfer
>> with an SFTP client, like the sftp command, then it takes about 10 or 20
>> seconds.
> Another possibility is the size of the channel window that libssh2 uses.
> libssh2 has a channel window size of 64K (LIBSSH2_CHANNEL_WINDOW_DEFAULT,
> from libssh2.h); OpenSSH (at least looking at the 5.2p1 sources I have
> handy) shows a channel window size of 2048K.  A smaller window size
> results in more back-and-forth traffic; you might try increasing
> LIBSSH2_CHANNEL_WINDOW_DEFAULT to see if that affects your tests.
>
> Cheers,
> TJ
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
>     Where is the Life we have lost in living?
>     Where is the wisdom we have lost in knowledge?
>     Where is the knowledge we have lost in information?
>
>       -T.S. Eliot
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


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

From libssh2-devel-bounces@cool.haxx.se  Wed Sep  1 21:59:39 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o81Jxc4W004175;
	Wed, 1 Sep 2010 21:59:39 +0200
Received: from mcfeely.foofus.net (mcfeely.foofus.net [64.73.34.167])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o81JxZlV004157
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Wed, 1 Sep 2010 21:59:37 +0200
Received: (qmail 23788 invoked from network); 1 Sep 2010 19:59:27 -0000
Received: from unknown (HELO ?127.0.0.1?) (relay@127.0.0.1)
	by localhost with ESMTPA; 1 Sep 2010 19:59:27 -0000
Subject: Re: Thread safety issues
From: jmk <jmk@foofus.net>
To: libssh2 development <libssh2-devel@cool.haxx.se>
In-Reply-To: <878w3ljxxt.fsf@mocca.josefsson.org>
References: <1282839657.18286.4.camel@localhost>
	<000501cb46e7$567e7970$037b6c50$@com>
	<AANLkTik9TNTF_OrT1hXqRPoF6Uc=hdZYxwMbq-hwrOSL@mail.gmail.com>
	<alpine.DEB.2.00.1008301549010.20506@tvnag.unkk.fr>
	<1283201535.18729.59.camel@localhost>
	<alpine.DEB.2.00.1008302253220.19589@tvnag.unkk.fr>
	<1283206745.18729.70.camel@localhost>
	<87occjp69d.fsf@mocca.josefsson.org>
	<1283283836.18534.28.camel@localhost>
	<87occiimlp.fsf@mocca.josefsson.org>
	<1283287411.18534.56.camel@localhost>
	<87y6bmh59n.fsf@mocca.josefsson.org>
	<1283288569.18534.61.camel@localhost>
	<878w3ljxxt.fsf@mocca.josefsson.org>
Organization: Foofus Networks
Date: Wed, 01 Sep 2010 14:59:27 -0500
Message-ID: <1283371167.28702.9.camel@localhost>
Mime-Version: 1.0
X-Mailer: Evolution 2.30.2 
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Wed, 01 Sep 2010 21:59:39 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Wed, 01 Sep 2010 21:59:37 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

On Wed, 2010-09-01 at 17:17 +0200, Simon Josefsson wrote:
> > Not feasible given the current design of my application -- all SSH code
> > is contained within a module, which can be loaded by one or more
> > threads.
> 
> Ouch.  How does your application handle this for other libraries?  There
> are many libraries out there that need global initialization.  So it may
> make sense to consider making your application call a module-init
> function before proceeding.  Of course, this is speaking just generally,
> and there may be reasons why this isn't an option for you.

I also never claimed I really know what I'm doing. ;) This is the first
time that I've encountered a library specific to only one of my modules
which requires global initialization. Libraries, such as OpenSSL, are
used across the application and can be initialized in the core. I
believe module init/exit functions would make sense for this type of
situation. That's been added to my TODO list to look at.

Thanks,
Joe

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

From libssh2-devel-bounces@cool.haxx.se  Wed Sep  1 23:05:46 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o81L5SC1025129;
	Wed, 1 Sep 2010 23:05:44 +0200
Received: from earth.stuge.se (earth.stuge.se [213.88.146.15])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o81L5RJn025121
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Wed, 1 Sep 2010 23:05:27 +0200
Received: (qmail 9420 invoked from network); 1 Sep 2010 21:05:21 -0000
Received: from unknown (HELO earth.stuge.se) (127.0.0.1)
	by localhost with SMTP; 1 Sep 2010 21:05:21 -0000
MIME-Version: 1.0
From: "libssh2 Trac" <trac@libssh2.stuge.se>
X-Trac-Version: 0.12b1
Precedence: bulk
Cc: libssh2-devel@cool.haxx.se
Auto-Submitted: auto-generated
X-Mailer: Trac 0.12b1, by Edgewall Software
X-Trac-Project: libssh2
Date: Wed, 01 Sep 2010 21:05:21 -0000
X-URL: http://trac.libssh2.org/
Subject: [libssh2] #184: Decompression buffers are too small
X-Trac-Ticket-URL: http://trac.libssh2.org/ticket/184
Message-ID: <052.8b031ed1b041784e6eb93c8278090860@libssh2.stuge.se>
X-Trac-Ticket-ID: 184
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Wed, 01 Sep 2010 23:05:46 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Wed, 01 Sep 2010 23:05:27 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Reply-To: trac@libssh2.stuge.se,
        libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

IzE4NDogRGVjb21wcmVzc2lvbiBidWZmZXJzIGFyZSB0b28gc21hbGwKLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLQ0KIFJlcG9ydGVyOiAgdGpA4oCmICAgICAgICAgICAgICB8ICAgICAgIE93bmVyOiAgICAg
ICANCiAgICAgVHlwZTogIGRlZmVjdCAgICAgICAgICAgIHwgICAgICBTdGF0dXM6ICBuZXcgIA0K
IFByaW9yaXR5OiAgbm9ybWFsICAgICAgICAgICAgfCAgIE1pbGVzdG9uZTogIDEuMi42DQpDb21w
b25lbnQ6ICBwcm90b2NvbCAgICAgICAgICB8ICAgICBWZXJzaW9uOiAgMS4yLjcNCiBLZXl3b3Jk
czogICAgICAgICAgICAgICAgICAgIHwgICAgICBCbG9ja3M6ICAgICAgIA0KQmxvY2tlZCBCeTog
ICAgICAgICAgICAgICAgICAgIHwgIA0KLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tL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bWFpbG1hbi9saXN0
aW5mby9saWJzc2gyLWRldmVsCg==

From libssh2-devel-bounces@cool.haxx.se  Wed Sep  1 23:06:56 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o81L6sJm025672;
	Wed, 1 Sep 2010 23:06:55 +0200
Received: from earth.stuge.se (earth.stuge.se [213.88.146.15])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o81L6q3o025666
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Wed, 1 Sep 2010 23:06:52 +0200
Received: (qmail 9840 invoked from network); 1 Sep 2010 21:06:49 -0000
Received: from unknown (HELO earth.stuge.se) (127.0.0.1)
	by localhost with SMTP; 1 Sep 2010 21:06:49 -0000
MIME-Version: 1.0
From: "libssh2 Trac" <trac@libssh2.stuge.se>
X-Trac-Version: 0.12b1
Precedence: bulk
Cc: libssh2-devel@cool.haxx.se
Auto-Submitted: auto-generated
X-Mailer: Trac 0.12b1, by Edgewall Software
X-Trac-Project: libssh2
Date: Wed, 01 Sep 2010 21:06:49 -0000
X-URL: http://trac.libssh2.org/
Subject: Re: [libssh2] #184: Decompression buffers are too small
X-Trac-Ticket-URL: http://trac.libssh2.org/ticket/184#comment:1
Message-ID: <067.14e7fd5f4300402251a7b04ba4c2e518@libssh2.stuge.se>
References: <052.8b031ed1b041784e6eb93c8278090860@libssh2.stuge.se>
X-Trac-Ticket-ID: 184
In-Reply-To: <052.8b031ed1b041784e6eb93c8278090860@libssh2.stuge.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Wed, 01 Sep 2010 23:06:56 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Wed, 01 Sep 2010 23:06:52 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Reply-To: trac@libssh2.stuge.se,
        libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

IzE4NDogRGVjb21wcmVzc2lvbiBidWZmZXJzIGFyZSB0b28gc21hbGwKLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLQ0KICBSZXBvcnRlcjogIHRqQOKApiAgICAgICAgICAgICAgfCAgICAgICBPd25lcjogICAg
ICAgDQogICAgICBUeXBlOiAgZGVmZWN0ICAgICAgICAgICAgfCAgICAgIFN0YXR1czogIG5ldyAg
DQogIFByaW9yaXR5OiAgbm9ybWFsICAgICAgICAgICAgfCAgIE1pbGVzdG9uZTogICAgICAgDQog
Q29tcG9uZW50OiAgcHJvdG9jb2wgICAgICAgICAgfCAgICAgVmVyc2lvbjogIDEuMi43DQpSZXNv
bHV0aW9uOiAgICAgICAgICAgICAgICAgICAgfCAgICBLZXl3b3JkczogICAgICAgDQogICAgQmxv
Y2tzOiAgICAgICAgICAgICAgICAgICAgfCAgIEJsb2NrZWQgQnk6ICAgICAgIA0KLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLQpDaGFuZ2VzIChieSB0akDigKYpOgoKICAqIG1pbGVzdG9uZTogIDEuMi42ID0+
DQoKCi0tIApUaWNrZXQgVVJMOiA8aHR0cDovL3RyYWMubGlic3NoMi5vcmcvdGlja2V0LzE4NCNj
b21tZW50OjE+CmxpYnNzaDIgPGh0dHA6Ly90cmFjLmxpYnNzaDIub3JnLz4KQyBsaWJyYXJ5IGZv
ciB3cml0aW5nIHBvcnRhYmxlIFNTSDIgY2xpZW50cwpfX19fX19fX19fX19fX19fX19fX19fX19f
X19fX19fX19fX19fX19fX19fX19fXwpsaWJzc2gyLWRldmVsIGh0dHA6Ly9jb29sLmhheHguc2Uv
Y2dpLWJpbi9tYWlsbWFuL2xpc3RpbmZvL2xpYnNzaDItZGV2ZWwK

From libssh2-devel-bounces@cool.haxx.se  Thu Sep  2 08:39:02 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o826cGYI025186;
	Thu, 2 Sep 2010 08:38:56 +0200
Received: from yxa-v.extundo.com (yxa-v.extundo.com [83.241.177.39])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o826cE4u025179
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Thu, 2 Sep 2010 08:38:14 +0200
Received: from mocca (c80-216-27-64.bredband.comhem.se [80.216.27.64])
	(authenticated bits=0)
	by yxa-v.extundo.com (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id
	o826c7bk002634
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Thu, 2 Sep 2010 08:38:10 +0200
From: Simon Josefsson <simon@josefsson.org>
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: Libssh2: Libgcrypt authentication failure
References: <4C70D8C0.4536FA68@rcom-software.com>
	<AANLkTimSAhpscwuQnBGxz-bpGi0RFDunBaurrpmxSBbc@mail.gmail.com>
	<87r5hqvabb.fsf@mocca.josefsson.org>
	<4C7E95ED.F93D0814@rcom-software.com>
OpenPGP: id=B565716F; url=http://josefsson.org/key.txt
X-Hashcash: 1:22:100902:libssh2-devel@cool.haxx.se::lG1k+qc3ajHlR+nr:ZurX
Date: Thu, 02 Sep 2010 08:38:04 +0200
In-Reply-To: <4C7E95ED.F93D0814@rcom-software.com> (Paul Romero's message of
	"Wed, 01 Sep 2010 11:05:33 -0700")
Message-ID: <874oe8hcqb.fsf@mocca.josefsson.org>
User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.2 (gnu/linux)
MIME-Version: 1.0
X-Spam-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00,
	DATE_IN_FUTURE_96_XX,RDNS_DYNAMIC,SPF_FAIL autolearn=no version=3.2.5
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on yxa-v.extundo.com
X-Virus-Scanned: clamav-milter 0.96.1 at yxa-v
X-Virus-Status: Clean
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Thu, 02 Sep 2010 08:39:01 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Thu, 02 Sep 2010 08:38:14 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Paul Romero <paulr@rcom-software.com> writes:

> Hi Simon:
>
> What version of PKCS is commonly used by SSH and SFTP
> servers claiming RSA 2 conformance ?  I believe it is
> version 11 or 12.

I'm not sure what you mean here -- PKCS is a set of standards, of which
PKCS#1 specify RSA and it exists in several version, but SSH is using
v1.5 and libssh2 supports that.  PKCS#11 and PKCS#12 specify other
things, but there is no support for it in libssh2.

/Simon

> Best Regards,
>
> Paul R.
>
> Simon Josefsson wrote:
>
>> Alexander Lamaison <swish@lammy.co.uk> writes:
>>
>> > On 22 August 2010 08:58, Paul Romero <paulr@rcom-software.com> wrote:
>> >>
>> >> I am experiencing a problem with libssh2 version 1.2.6 which
>> >> I don't understand. The symptoms are described below and suggest
>> >> the problem is specific to libgcrypt. Any insight about the
>> >> problem would be greatly appreciated
>> > ...
>> >>    const char *username="paulr"; /* System Must stripped */
>> >>    const char *password="secret_agent";
>> >>    const char *loclfile="sftp_write_nonblock.c";
>> > ...
>> >> while ((rc = libssh2_userauth_publickey_fromfile(session, username,
>> >>        "/home/paulr/.ssh/id_rsa.pub",
>> >>        "/home/paulr/.ssh/id_rsa",
>> >>        password)) == LIBSSH2_ERROR_EAGAIN);
>> >
>> > I vaguely remember someone saying that libgcrypt can't handle a
>> > private key with a passphrase.  Is this true or am I making things up?
>>
>> It is true.  The Libgcrypt backend in libssh2 contains a hand written
>> slimmed down ASN.1 parser to read out the RSA key, but it does not
>> support any of the PKCS* encrypted forms of RSA keys.  The OpenSSL
>> backend in libssh2 uses OpenSSL to read the keys, so it supports
>> whatever private key formats that OpenSSL supports.
>>
>> /Simon
>> _______________________________________________
>> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
>
> --
> Paul Romero
>
> RCOM Communications Software
>
> Phone/Fax: (510)339-2628
> E-Mail: paulr@rcom-software.com
>
>
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Sat Sep  4 02:33:14 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o840WghX029954;
	Sat, 4 Sep 2010 02:33:08 +0200
Received: from snt0-omc4-s6.snt0.hotmail.com (snt0-omc4-s6.snt0.hotmail.com
	[65.55.90.209])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o840WdBY029904
	for <libssh2-devel@cool.haxx.se>; Sat, 4 Sep 2010 02:32:40 +0200
Received: from SNT115-W16 ([65.55.90.199]) by snt0-omc4-s6.snt0.hotmail.com
	with Microsoft SMTPSVC(6.0.3790.4675); 
	Fri, 3 Sep 2010 17:32:26 -0700
Message-ID: <SNT115-W1670983092213680554E2CDA8E0@phx.gbl>
X-Originating-IP: [115.64.177.97]
From: dfg dfg <abxccd@msn.com>
To: <libssh2-devel@cool.haxx.se>
Subject: Error opening SCP channel
Date: Sat, 4 Sep 2010 00:32:25 +0000
Importance: Normal
MIME-Version: 1.0
X-OriginalArrivalTime: 04 Sep 2010 00:32:26.0051 (UTC)
	FILETIME=[A5FC5130:01CB4BC8]
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Sat, 04 Sep 2010 02:33:14 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Sat, 04 Sep 2010 02:32:40 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0086355811=="
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

--===============0086355811==
Content-Type: multipart/alternative;
	boundary="_afeaa24d-2e8f-4c25-9578-15968e2407e7_"

--_afeaa24d-2e8f-4c25-9578-15968e2407e7_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


Hi all=2C

=20

I am currently writing a program that will use libssh2 on Ubuntu 10.04. To =
make sure I have SSH working=2C I installed openssh-server and tested it by=
 connecting to it. I also successfully SCP'd a file to the server using the=
 "scp" command.

=20

I then did a small test by using libssh2 to connect to the ssh server=2C op=
en a ssh channel and run a command such as "uptime". This all worked perfec=
tly.

=20

However=2C I ran into a problem when trying to send a file using SCP. I hav=
e followed the example code here: http://www.libssh2.org/examples/scp_write=
.html

=20

The code was copied and pasted from that example. I was successful in conne=
cting to the SSH server and logging in. But=2C I seem to get an error when =
opening the SCP channel.

=20

The code to do so is the following:

    /* Send a file via scp. The mode parameter must only have permissions! =
*/=20
    channel =3D libssh2_scp_send(session=2C scppath=2C fileinfo.st_mode & 0=
777=2C (unsigned long)fileinfo.st_size)=3B
=20
    if (!channel) {
        char *errmsg=3B
        int errlen=3B
        int err =3D libssh2_session_last_error(session=2C &errmsg=2C &errle=
n=2C 0)=3B

        fprintf(stderr=2C "Unable to open a session: (%d) %s\n"=2C err=2C e=
rrmsg)=3B
        goto shutdown=3B
    }


This returns an error: Unable to open a session: (0)=20


I am not sure what is meant by the error code 0. I also thought it was a bi=
t weird that there was no error message set into err msg.

=20

If I do comment out the lines that checks whether the channel has been set=
=2C I get another error from this block of code:

do {
        nread =3D fread(mem=2C 1=2C sizeof(mem)=2C local)=3B
        if (nread <=3D 0) {
            /* end of file */=20
            break=3B
        }
        ptr =3D mem=3B
=20
        do {
            /* write the same data over and over=2C until error or completi=
on */=20
            rc =3D libssh2_channel_write(channel=2C ptr=2C nread)=3B

            if (rc < 0) {
                fprintf(stderr=2C "ERROR %d\n"=2C rc)=3B
                break=3B
            }
            else {
                /* rc indicates how many bytes were written this time */=20
                ptr +=3D rc=3B
                nread -=3D rc=3B
            }
        } while (nread)=3B
  } while (1)=3B

=20


I get the error: ERROR -39

=20

Can anyone please assist me and tell me what I have done wrong?

=20

Thank you very much :)
 		 	   		  =

--_afeaa24d-2e8f-4c25-9578-15968e2407e7_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style><!--
.hmmessage P
{
margin:0px=3B
padding:0px
}
body.hmmessage
{
font-size: 10pt=3B
font-family:Tahoma
}
--></style>
</head>
<body class=3D'hmmessage'>
Hi all=2C<BR>
&nbsp=3B<BR>
I am currently writing a program that will use libssh2 on Ubuntu 10.04. To =
make sure I have SSH working=2C I installed openssh-server and tested it by=
 connecting to it. I also successfully SCP'd a file to the server using the=
 "scp" command.<BR>
&nbsp=3B<BR>
I then did a small test by using libssh2 to connect to the ssh server=2C op=
en a ssh channel and run a command such as "uptime". This all worked perfec=
tly.<BR>
&nbsp=3B<BR>
However=2C I ran into a problem when trying to send a file using SCP. I hav=
e followed the example code here: <A href=3D"http://www.libssh2.org/example=
s/scp_write.html">http://www.libssh2.org/examples/scp_write.html</A><BR>
&nbsp=3B<BR>
The code was copied and pasted from that example. I was successful in conne=
cting to the SSH server and logging in. But=2C I seem to get an error when =
opening the SCP channel.<BR>
&nbsp=3B<BR>
The code to do so is the following:<BR>
&nbsp=3B&nbsp=3B&nbsp=3B <I><FONT color=3D#b22222>/* Send a file via scp. T=
he mode parameter must only have permissions! */ </FONT></I><BR>&nbsp=3B&nb=
sp=3B&nbsp=3B channel =3D <A href=3D"http://www.libssh2.org//libssh2_scp_se=
nd.html">libssh2_scp_send</A>(session=2C scppath=2C fileinfo.st_mode &amp=
=3B 0777=2C (<B><FONT color=3D#228b22>unsigned</FONT></B> <B><FONT color=3D=
#228b22>long</FONT></B>)fileinfo.st_size)=3B<BR>&nbsp=3B<BR>&nbsp=3B&nbsp=
=3B&nbsp=3B <B><FONT color=3D#a020f0>if</FONT></B> (!channel) {<BR>&nbsp=3B=
&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B <B><FONT color=3D#228b22>c=
har</FONT></B> *errmsg=3B<BR>&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=
=3B&nbsp=3B <B><FONT color=3D#228b22>int</FONT></B> errlen=3B<BR>&nbsp=3B&n=
bsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B <B><FONT color=3D#228b22>int=
</FONT></B> err =3D <A href=3D"http://www.libssh2.org//libssh2_session_last=
_error.html">libssh2_session_last_error</A>(session=2C &amp=3Berrmsg=2C &am=
p=3Berrlen=2C 0)=3B<BR><BR>&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B=
&nbsp=3B fprintf(stderr=2C <B><FONT color=3D#bc8f8f>"Unable to open a sessi=
on: (%d) %s\n"</FONT></B>=2C err=2C errmsg)=3B<BR>&nbsp=3B&nbsp=3B&nbsp=3B&=
nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B <B><FONT color=3D#a020f0>goto</FONT></B> <B=
><FONT color=3D#5f9ea0>shutdown</FONT></B>=3B<BR>&nbsp=3B&nbsp=3B&nbsp=3B }=
<BR><BR>
This returns an error: Unable to open a session: (0) <BR><BR>
I am not sure what is meant by the error code 0. I also thought it was a bi=
t weird that there was no error message set into err msg.<BR>
&nbsp=3B<BR>
If I do comment out the lines that checks whether the channel has been set=
=2C I get another error from this block of code:<BR>
<STRONG><FONT color=3D#a020f0>do</FONT></STRONG> {<BR>&nbsp=3B&nbsp=3B&nbsp=
=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B nread =3D fread(mem=2C 1=2C <B><FONT co=
lor=3D#a020f0>sizeof</FONT></B>(mem)=2C local)=3B<BR>&nbsp=3B&nbsp=3B&nbsp=
=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B <B><FONT color=3D#a020f0>if</FONT></B> =
(nread &lt=3B=3D 0) {<BR>&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&n=
bsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B <I><FONT color=3D#b22222>/* end of f=
ile */ </FONT></I><BR>&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=
=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B <B><FONT color=3D#a020f0>break</FONT></=
B>=3B<BR>&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B }<BR>&nbs=
p=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B ptr =3D mem=3B<BR>&nbs=
p=3B<BR>&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B <B><FONT c=
olor=3D#a020f0>do</FONT></B> {<BR>&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&=
nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B <I><FONT color=3D#b22222>/*=
 write the same data over and over=2C until error or completion */ </FONT><=
/I><BR>&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbs=
p=3B&nbsp=3B&nbsp=3B rc =3D <A href=3D"http://www.libssh2.org//libssh2_chan=
nel_write.html">libssh2_channel_write</A>(channel=2C ptr=2C nread)=3B<BR><B=
R>&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&=
nbsp=3B&nbsp=3B <B><FONT color=3D#a020f0>if</FONT></B> (rc &lt=3B 0) {<BR>&=
nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbs=
p=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B fprintf(stderr=2C <B><FONT col=
or=3D#bc8f8f>"ERROR %d\n"</FONT></B>=2C rc)=3B<BR>&nbsp=3B&nbsp=3B&nbsp=3B&=
nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbs=
p=3B&nbsp=3B&nbsp=3B <B><FONT color=3D#a020f0>break</FONT></B>=3B<BR>&nbsp=
=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B=
&nbsp=3B }<BR>&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=
=3B&nbsp=3B&nbsp=3B&nbsp=3B <B><FONT color=3D#a020f0>else</FONT></B> {<BR>&=
nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbs=
p=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B <I><FONT color=3D#b22222>/* rc=
 indicates how many bytes were written this time */ </FONT></I><BR>&nbsp=3B=
&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nb=
sp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B ptr +=3D rc=3B<BR>&nbsp=3B&nbsp=3B&nb=
sp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=
=3B&nbsp=3B&nbsp=3B&nbsp=3B nread -=3D rc=3B<BR>&nbsp=3B&nbsp=3B&nbsp=3B&nb=
sp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B }<BR>&nbsp=3B=
&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B } <B><FONT color=3D#a020f0=
>while</FONT></B> (nread)=3B<BR>&nbsp=3B } <B><FONT color=3D#a020f0>while</=
FONT></B> (1)=3B<BR>
&nbsp=3B<BR>
<BR>I get the error: ERROR -39<BR>
&nbsp=3B<BR>
Can anyone please assist me and tell me what I have done wrong?<BR>
&nbsp=3B<BR>
Thank you very much :)<BR> 		 	   		  </body>
</html>=

--_afeaa24d-2e8f-4c25-9578-15968e2407e7_--

--===============0086355811==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============0086355811==--

From libssh2-devel-bounces@cool.haxx.se  Sat Sep  4 05:24:32 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8420gB6007834;
	Sat, 4 Sep 2010 04:00:57 +0200
Received: from snt0-omc4-s48.snt0.hotmail.com (snt0-omc4-s48.snt0.hotmail.com
	[65.54.51.99])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8420eLs007774
	for <libssh2-devel@cool.haxx.se>; Sat, 4 Sep 2010 04:00:40 +0200
Received: from SNT115-W43 ([65.55.90.201]) by snt0-omc4-s48.snt0.hotmail.com
	with Microsoft SMTPSVC(6.0.3790.4675); 
	Fri, 3 Sep 2010 19:00:32 -0700
Message-ID: <SNT115-W43906E9D5EB7BEE1AFB480DA8E0@phx.gbl>
X-Originating-IP: [115.64.177.97]
From: dfg dfg <abxccd@msn.com>
To: <libssh2-devel@cool.haxx.se>
Subject: How to use libssh2_channel_write()
Date: Sat, 4 Sep 2010 02:00:31 +0000
Importance: Normal
MIME-Version: 1.0
X-OriginalArrivalTime: 04 Sep 2010 02:00:32.0295 (UTC)
	FILETIME=[F4D52370:01CB4BD4]
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Sat, 04 Sep 2010 04:00:58 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Sat, 04 Sep 2010 04:00:41 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============1839767562=="
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

--===============1839767562==
Content-Type: multipart/alternative;
	boundary="_485aae0e-1c41-4f7b-8d60-111af1ea86a8_"

--_485aae0e-1c41-4f7b-8d60-111af1ea86a8_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable


Hi all=2C

=20

I would like to know how to use the libssh2_channel_write() command to writ=
e a command to a shell. My code is copied from: http://www.libssh2.org/exam=
ples/ssh2.html

=20

I have accquired a shell and a pty. In the sample code=2C there is the foll=
owing comment:

=20

  /* At this point the shell can be interacted with using
     * libssh2_channel_read()
     * libssh2_channel_read_stderr()
     * libssh2_channel_write()
     * libssh2_channel_write_stderr()
     *
     * Blocking mode may be (en|dis)abled with: libssh2_channel_set_blockin=
g()
     * If the server send EOF=2C libssh2_channel_eof() will return non-0
     * To send EOF to the server use: libssh2_channel_send_eof()
     * A channel can be closed with: libssh2_channel_close()
     * A channel can be freed with: libssh2_channel_free()
     */=20


I then attempted to use libssh2_channel_write() to send a command. Here's w=
hat I've done:

=20

int rc =3D 0=3B
char command[50] =3D "mkdir ~/testfolder\n"=3B

rc =3D libssh2_channel_write(channel=2C command=2C sizeof(command))=3B
fprintf(stderr=2C "bytes written %d\n"=2C rc)=3B

libssh2_channel_send_eof(channel)=3B

=20

I get a positive number of bytes written. However the command never execute=
s (the folder is not created). Can any one tell me what went wrong?

=20

Thanks!
 		 	   		  =

--_485aae0e-1c41-4f7b-8d60-111af1ea86a8_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html>
<head>
<style><!--
.hmmessage P
{
margin:0px=3B
padding:0px
}
body.hmmessage
{
font-size: 10pt=3B
font-family:Tahoma
}
--></style>
</head>
<body class=3D'hmmessage'>
Hi all=2C<BR>
&nbsp=3B<BR>
I would like to know how to use the libssh2_channel_write() command to writ=
e a command to a shell. My code is copied from: <A href=3D"http://www.libss=
h2.org/examples/ssh2.html">http://www.libssh2.org/examples/ssh2.html</A><BR=
>
&nbsp=3B<BR>
I have accquired a shell and a pty. In the sample code=2C there is the foll=
owing comment:<BR>
&nbsp=3B<BR>
&nbsp=3B <I><FONT color=3D#b22222>/* At this point the shell can be interac=
ted with using<BR>&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B * <A href=3D"http://www.=
libssh2.org//libssh2_channel_read.html">libssh2_channel_read</A>()<BR>&nbsp=
=3B&nbsp=3B&nbsp=3B&nbsp=3B * <A href=3D"http://www.libssh2.org//libssh2_ch=
annel_read_stderr.html">libssh2_channel_read_stderr</A>()<BR>&nbsp=3B&nbsp=
=3B&nbsp=3B&nbsp=3B * <A href=3D"http://www.libssh2.org//libssh2_channel_wr=
ite.html">libssh2_channel_write</A>()<BR>&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B *=
 <A href=3D"http://www.libssh2.org//libssh2_channel_write_stderr.html">libs=
sh2_channel_write_stderr</A>()<BR>&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B *<BR>&nb=
sp=3B&nbsp=3B&nbsp=3B&nbsp=3B * Blocking mode may be (en|dis)abled with: <A=
 href=3D"http://www.libssh2.org//libssh2_channel_set_blocking.html">libssh2=
_channel_set_blocking</A>()<BR>&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B * If the se=
rver send EOF=2C <A href=3D"http://www.libssh2.org//libssh2_channel_eof.htm=
l">libssh2_channel_eof</A>() will return non-0<BR>&nbsp=3B&nbsp=3B&nbsp=3B&=
nbsp=3B * To send EOF to the server use: <A href=3D"http://www.libssh2.org/=
/libssh2_channel_send_eof.html">libssh2_channel_send_eof</A>()<BR>&nbsp=3B&=
nbsp=3B&nbsp=3B&nbsp=3B * A channel can be closed with: <A href=3D"http://w=
ww.libssh2.org//libssh2_channel_close.html">libssh2_channel_close</A>()<BR>=
&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B * A channel can be freed with: <A href=3D"=
http://www.libssh2.org//libssh2_channel_free.html">libssh2_channel_free</A>=
()<BR>&nbsp=3B&nbsp=3B&nbsp=3B&nbsp=3B */ </FONT></I><BR><BR>
I then attempted to use libssh2_channel_write() to send a command. Here's w=
hat I've done:<BR>
&nbsp=3B<BR>
int rc =3D 0=3B<BR>char command[50] =3D "mkdir ~/testfolder\n"=3B<BR>
rc =3D libssh2_channel_write(channel=2C command=2C sizeof(command))=3B<BR>f=
printf(stderr=2C "bytes written&nbsp=3B%d\n"=2C rc)=3B<BR>
libssh2_channel_send_eof(channel)=3B<BR>
&nbsp=3B<BR>
I get a positive number of bytes written. However the command never execute=
s (the folder is not created). Can any one tell me what went wrong?<BR>
&nbsp=3B<BR>
Thanks!<BR> 		 	   		  </body>
</html>=

--_485aae0e-1c41-4f7b-8d60-111af1ea86a8_--

--===============1839767562==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============1839767562==--

From libssh2-devel-bounces@cool.haxx.se  Mon Sep  6 00:11:34 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o85MBA4O001997;
	Mon, 6 Sep 2010 00:11:30 +0200
Received: from giant.haxx.se (giant.haxx.se [80.67.6.50])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o85MB9eN001974
	for <libssh2-devel@cool.haxx.se>; Mon, 6 Sep 2010 00:11:09 +0200
Date: Mon, 6 Sep 2010 00:11:09 +0200 (CEST)
From: Daniel Stenberg <daniel@haxx.se>
X-X-Sender: dast@giant.haxx.se
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: portability issue with libssh2_session_startup
Message-ID: <alpine.DEB.2.00.1009060008240.26638@tvnag.unkk.fr>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
X-fromdanielhimself: yes
MIME-Version: 1.0
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Mon, 06 Sep 2010 00:11:34 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Mon, 06 Sep 2010 00:11:09 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Hi!

It just struck me that libssh2_session_startup() has a prototype that accepts 
an 'int' for the socket in the second argument.

This is all good for the majority of all systems I know of, except for win64. 
That system has 64bit sockets but 32bit ints (and longs!)...

I believe this is a reason to finally make the libssh2_socket_t type visible 
in the public headers and introduce a libssh2_session_startup() replacement 
that uses such a type.

Or can we do it any other way decently?

-- 

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

From libssh2-devel-bounces@cool.haxx.se  Mon Sep  6 17:55:50 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o86FtTot018315;
	Mon, 6 Sep 2010 17:55:47 +0200
Received: from mail2.barcelona04.com (mx2.barcelona04.com [190.139.108.163])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o86FtQOD018295
	for <libssh2-devel@cool.haxx.se>; Mon, 6 Sep 2010 17:55:27 +0200
X-Spam-Status: No, hits=0.0 required=4.0
	tests=AWL: 0.000,BAYES_00: -1.665,CUSTOM_RULE_FROM: ALLOW,
	TOTAL_SCORE: -1.665,autolearn=ham
X-Spam-Level: 
Received: from localhost ([127.0.0.1]) by mail2.barcelona04.com
	for libssh2-devel@cool.haxx.se; Mon, 6 Sep 2010 12:53:02 -0300
Message-ID: <4C850DA2.3090709@barcelona04.com>
Date: Mon, 06 Sep 2010 12:49:54 -0300
From: Ezequiel Ruiz <eruiz@barcelona04.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; es-AR;
	rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2
MIME-Version: 1.0
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: keyboard-interactive method gives access violation in MSVC 2008
References: <SNT115-W1670983092213680554E2CDA8E0@phx.gbl>
In-Reply-To: <SNT115-W1670983092213680554E2CDA8E0@phx.gbl>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Mon, 06 Sep 2010 17:55:50 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Mon, 06 Sep 2010 17:55:28 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

  Hello guys,

I was writing a wrapper class for libssh2 with visual c++ 2008, and I've 
found an issue when calling the callback function from the examples 
(kbd_callback). My class just calls for a method "init", and the 
kbd_callback function is defined as static in the cpp file, so it's 
hidden to the rest of the wrapper. Password authentication works fine, 
but keyboard just crashes with an access violation when calling 
libssh2_userauth_keyboard_interactive().
During my short debugging, I've found that the callback function is 
called and all variables are properly assigned, as the "Password:" text 
for the prompt, and the password I'm sending (I'm forcing a unique 
password for this test).
I'm not sure what can be wrong, the libssh2 version is 1.2.7. And the 
compile is VS2008 (windows 7).

Regards,

Ezequiel

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

From libssh2-devel-bounces@cool.haxx.se  Mon Sep  6 18:13:54 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o86GDiY2031894;
	Mon, 6 Sep 2010 18:13:52 +0200
Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com
	[209.85.216.54])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o86GDf5A031855
	for <libssh2-devel@cool.haxx.se>; Mon, 6 Sep 2010 18:13:42 +0200
Received: by qwg5 with SMTP id 5so4933402qwg.41
	for <libssh2-devel@cool.haxx.se>; Mon, 06 Sep 2010 09:13:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=googlemail.com; s=gamma;
	h=domainkey-signature:mime-version:received:sender:received
	:in-reply-to:references:date:x-google-sender-auth:message-id:subject
	:from:to:content-type;
	bh=jWqqnpMXqbe+qo25Q/ICAZuwChmxyy6MR54KFwqTgsM=;
	b=tOA70313lU5EzUsWtYqX84DnHd9FhSc3TIP5tcyIfz5BH9QnOOnyyvImsIy7NImkYN
	/Ws7cJOkyFZ0tYVQ7kvIMoD1DVgsHMeVtdt1d+ozKhbQNM5Oxw85f+IAXV+AsGnoqvbT
	g7l+9pns3g6eaQ4lKPrefzU7Dnxc9FUm6KC6Q=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type;
	b=tkHuLmmPaj2i+sFkpfblYIkye6kpW9y2Q7NGA/09Uk6VqcgGoZmsAgVXtxEZoOOW69
	1TthilfdlSz4Dj7DiAD/ZB8h/1qCIohxqO16f0SuKPiVGxoGq6NZRnyxok/Z6Gr3RObe
	MYkwP5DGnGyQf6aLBo3MNLlhq7Rwzr7IbREX8=
MIME-Version: 1.0
Received: by 10.229.183.20 with SMTP id ce20mr1091136qcb.203.1283789613455;
	Mon, 06 Sep 2010 09:13:33 -0700 (PDT)
Received: by 10.229.73.68 with HTTP; Mon, 6 Sep 2010 09:13:33 -0700 (PDT)
In-Reply-To: <4C850DA2.3090709@barcelona04.com>
References: <SNT115-W1670983092213680554E2CDA8E0@phx.gbl>
	<4C850DA2.3090709@barcelona04.com>
Date: Mon, 6 Sep 2010 17:13:33 +0100
X-Google-Sender-Auth: ko4CEL-EDuYadgaASriUS9FeV5k
Message-ID: <AANLkTim_cmSKJnYNjkanP7L8sxCNYwkm+_z1xks9C+6o@mail.gmail.com>
Subject: Re: keyboard-interactive method gives access violation in MSVC 2008
From: Alexander Lamaison <swish@lammy.co.uk>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Mon, 06 Sep 2010 18:13:54 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Mon, 06 Sep 2010 18:13:42 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

On 6 September 2010 16:49, Ezequiel Ruiz <eruiz@barcelona04.com> wrote:

...snip

> I'm not sure what can be wrong, the libssh2 version is 1.2.7. And the
> compile is VS2008 (windows 7).

Without looking at your example source code, we can't really help.

Alex

--
Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Mon Sep  6 18:28:50 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o86GShvw011312;
	Mon, 6 Sep 2010 18:28:49 +0200
Received: from shell.lmi.net (shell.lmi.net [66.117.140.246])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o86GSdIE011285
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Mon, 6 Sep 2010 18:28:41 +0200
Received: from rcom-software.com (75-101-82-95.dsl2st.lmi.net [75.101.82.95])
	by shell.lmi.net (8.14.1/8.14.1) with ESMTP id o86GSUfC038622
	for <libssh2-devel@cool.haxx.se>; Mon, 6 Sep 2010 09:28:35 -0700 (PDT)
Message-ID: <4C8516BB.5D2CE82C@rcom-software.com>
Date: Mon, 06 Sep 2010 09:28:43 -0700
From: Paul Romero <paulr@rcom-software.com>
Organization: RCOM Communications Software
X-Mailer: Mozilla 4.77 [en] (Win95; U)
X-Accept-Language: en,es,de-DE,fr-FR
MIME-Version: 1.0
To: libssh2-devel@cool.haxx.se
Subject: Libssh2: Use of temporary files
X-Scanned-By: MIMEDefang 2.37
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Mon, 06 Sep 2010 18:28:50 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Mon, 06 Sep 2010 18:28:41 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Dear Group:

I would like to know if libssh2 creates or writes temporary
files during the course of its operation.  There are only
two writable directories in my environment--embedded
UC Linux on a Coldfire 5249 CPU with a NAND Flash
JFFS2 file system.  One is  /var/tmp--/tmp is the same file
system in my environment--and that is not a problem because
it is a RAM file system and has plenty of space. The other
is /etc which is in the Flash file system. It is problematic
because JFFS2 is intrinsically slow and the flash file
system is fairly small.

Best Regards,

Paul R.


--
Paul Romero

RCOM Communications Software

Phone/Fax: (510)339-2628
E-Mail: paulr@rcom-software.com


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

From libssh2-devel-bounces@cool.haxx.se  Mon Sep  6 18:33:50 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o86GXj40013448;
	Mon, 6 Sep 2010 18:33:49 +0200
Received: from mail2.barcelona04.com (mx2.barcelona04.com [190.139.108.163])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o86GXgo3013436
	for <libssh2-devel@cool.haxx.se>; Mon, 6 Sep 2010 18:33:42 +0200
X-Spam-Status: No, hits=0.0 required=4.0
	tests=BAYES_00: -1.665, CUSTOM_RULE_FROM: ALLOW, TOTAL_SCORE: -1.665,
	autolearn=ham
X-Spam-Level: 
Received: from localhost ([127.0.0.1]) by mail2.barcelona04.com;
	Mon, 6 Sep 2010 13:31:15 -0300
Message-ID: <4C851697.1050606@barcelona04.com>
Date: Mon, 06 Sep 2010 13:28:07 -0300
From: Ezequiel Ruiz <eruiz@barcelona04.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; es-AR;
	rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2
MIME-Version: 1.0
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: keyboard-interactive method gives access violation in MSVC 2008
References: <SNT115-W1670983092213680554E2CDA8E0@phx.gbl>	<4C850DA2.3090709@barcelona04.com>
	<AANLkTim_cmSKJnYNjkanP7L8sxCNYwkm+_z1xks9C+6o@mail.gmail.com>
In-Reply-To: <AANLkTim_cmSKJnYNjkanP7L8sxCNYwkm+_z1xks9C+6o@mail.gmail.com>
Content-Type: multipart/mixed; boundary="------------030508020905000304090405"
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Mon, 06 Sep 2010 18:33:50 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Mon, 06 Sep 2010 18:33:44 +0200 (CEST)
Cc: Alexander Lamaison <swish@lammy.co.uk>
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

This is a multi-part message in MIME format.
--------------030508020905000304090405
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

  I'm sorry, you're right. I'm attaching the code of my class. It has an 
interface to hide dependencies for final applications. It is a windows DLL.
Basically, the callback function is the same as the one shown in the 
examples. I'm forcing the password just for testing purposes. As I've 
said, the callback function is declared in the CSSHSession.cpp, but 
outside the class.

The code crashes exactly at line 171, when calling 
libssh2_userauth_keyboard_interactive(m_Session, "root", &kbd_callback)

Regards,

Ezequiel

El 06/09/2010 01:13 p.m., Alexander Lamaison escribió:
> On 6 September 2010 16:49, Ezequiel Ruiz<eruiz@barcelona04.com>  wrote:
>
> ...snip
>
>> I'm not sure what can be wrong, the libssh2 version is 1.2.7. And the
>> compile is VS2008 (windows 7).
> Without looking at your example source code, we can't really help.
>
> Alex
>
> --
> Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


--------------030508020905000304090405
Content-Type: text/plain;
 name="ISSHSession.h"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="ISSHSession.h"

#ifndef __RUNCOMMAND_ISSHSESSION_INCLUDED__
#define __RUNCOMMAND_ISSHSESSION_INCLUDED__

#include "RunCommandBase.h"
#include "ISSHChannel.h"
#include "ISFTPSession.h"


//! \brief Connection information for SSH sessions.
struct RUNCOMMANDAPI SConnectionInfo
{
    //! \brief Default constructor.
    SConnectionInfo()
    : timeout_s(5),port(22),compress(false) {}

	int timeout_s; //!< The connection timeout in seconds.
	int port; //!< The connection port.
	bool compress;
	std::string hostname; //!< The remote hostname or ip address.
	std::string username; //!< The connection user name.
	std::string userpasswd; //!< The connection password.
	std::string pkeyfile; //!< The connection private key file path (SSHv2 only).
};

//! \brief Interface class to handle a remote SSH connection instance.

//! This class allows to manipulate remote SSH connections, create and manage
//! some other higher level interfaces, like channels and subsystems (SFTP), and
//! dealing with error messages.
//! This is the class you have to start with, after you have a working CSSHSession
//! instance, you can create several child instances of channels and SFTP subsistems
//! in the same session, and sharing the same connection socket.
//! It currently supports 3 authentication methods:
//! - Password authentication.
//! - Keyboard interactive authentication.
//! - Private Key authentication.
//!
//! \note For Keyboard Interactive authentication, it only supports a "direct" password
//! question, if the remote server includes a set of questions, it won't be able to connect.
//! \todo
//! - Improve multithread support for this class and derivates.
//! - Add child hierarchy.
//! - Add "known hosts" detection.
class RUNCOMMANDAPI ISSHSession
{
	public:

        //! \brief Constructor.
        //! \param session_id The assigned session ID, usefull for a higher-level manager implementation.
        //! \param log A CLogger instance, if provided, the object will use the logger
        //! to report errors or trak debugging information.
		ISSHSession(int session_id)
		: m_SessionID(session_id) {}

        //! \brief Connects to the server.

        //! It attemps to create a connection socket against the remote server.
        //! You need to have the connection parameters already defined with the
        //! ISSHSession::setConnectionInfo() method before calling this one.
        //! \return true on success, false on failure.
        //! you must use the CLogger to see error messages.
		virtual bool connect() = 0;

        //! \brief Closes the connection to the remote server
        //! \return true on success, false on failure.
        //! you must use the CLogger to see error messages.
		virtual bool disconnect() = 0;

        //! \brief Creates a new ISSHSession instance attached to this session.

        //! Once you have a valid connected session, you can create as many channels
        //! as you want. The limits are theoretical. Remember that you can call just
        //! one batch command per channel right now (still in research).
        //! \return A new ISSHSession object.
        //! \note You are responsable for deleting the allocated object.
		virtual ISSHChannel* createChannel() = 0;

        //! \brief Creates a new CSFTPSession instance attached to this session.

        //! Once you have a valid connected session, you can create as many SFTP
        //! sessions as you want. But normally you will use just one.
        //! \return A new CSFTPSession object.
        //! \note You are responsable for deleting the allocated object.
		virtual ISFTPSession* createSFTPSession() = 0;

        //! \brief Gets the internal session ID.
        //! \return The session ID. This ID is ignored at low-level, you may use it when
        //! implementing a session manager (read only).
		virtual int getSessionID() const = 0;

        //! \brief Set a connection info struct for this object.

        //! It is important to call this method with the right parameters BEFORE calling the
        //! ISSHSession::connect() method. It will fail if not.
        //! \param info The SConnectionInfo struct with the desired parameters.
		virtual void setConnectionInfo(const SConnectionInfo &info) = 0;

        //! \brief Gets the current connection info for this object.
        //! \return The SConnectionInfo struct with the current parameters (read only).
		virtual const SConnectionInfo& getConnectionInfo() const = 0;

        //! \brief Check if the session is connected to the remote server.
        //! \return true if connected, false if not.
        //! \todo Improve the stability of this method.
		virtual bool isConnected() = 0;

        //! \brief Destructor.
		virtual ~ISSHSession() {}

	protected:

		// Session ID is used to identify the object instance by the connection manager.
		// if a user creates two sessions with the same hostname, user and password, then
		// it will share the same object instance, but with different channels.
		int m_SessionID;
		
	private:
};

#endif //__RUNCOMMAND_ISSHSESSION_INCLUDED__

--------------030508020905000304090405
Content-Type: text/plain;
 name="CSSHSession.h"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="CSSHSession.h"

I2lmbmRlZiBfX1JVTkNPTU1BTkRfQ1NTSFNFU1NJT05fSU5DTFVERURfXw0KI2RlZmluZSBf
X1JVTkNPTU1BTkRfQ1NTSFNFU1NJT05fSU5DTFVERURfXw0KDQojaW5jbHVkZSAiSVNTSFNl
c3Npb24uaCINCiNpbmNsdWRlICJJTG9nZ2VyLmgiDQoNCiNpbmNsdWRlIDxsaWJzc2gyLmg+
DQojaW5jbHVkZSA8d2luc29jazIuaD4NCg0KDQovLyEgXGJyaWVmIENsYXNzIHRvIGhhbmRs
ZSBhIHJlbW90ZSBTU0ggY29ubmVjdGlvbiBpbnN0YW5jZS4NCg0KLy8hIFRoaXMgY2xhc3Mg
YWxsb3dzIHRvIG1hbmlwdWxhdGUgcmVtb3RlIFNTSCBjb25uZWN0aW9ucywgY3JlYXRlIGFu
ZCBtYW5hZ2UNCi8vISBzb21lIG90aGVyIGhpZ2hlciBsZXZlbCBpbnRlcmZhY2VzLCBsaWtl
IGNoYW5uZWxzIGFuZCBzdWJzeXN0ZW1zIChTRlRQKSwgYW5kDQovLyEgZGVhbGluZyB3aXRo
IGVycm9yIG1lc3NhZ2VzLg0KLy8hIFRoaXMgaXMgdGhlIGNsYXNzIHlvdSBoYXZlIHRvIHN0
YXJ0IHdpdGgsIGFmdGVy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AgICAgICAgICAg
ICAgY29uc3QgTElCU1NIMl9VU0VSQVVUSF9LQkRJTlRfUFJPTVBUICpwcm9tcHRzLAogICAg
ICAgICAgICAgICAgICAgICAgICAgTElCU1NIMl9VU0VSQVVUSF9LQkRJTlRfUkVTUE9OU0Ug
KnJlc3BvbnNlcywKICAgICAgICAgICAgICAgICAgICAgICAgIHZvaWQgKiphYnN0cmFjdCk7
DQoNCgkJU0Nvbm5lY3Rpb25JbmZvIG1fQ29ubmVjdGlvbkluZm87DQoNCiAgICAgICAgTElC
U1NIMl9TRVNTSU9OICptX1Nlc3Npb247DQoNCgkJc3RydWN0IHNvY2thZGRyX2luIHNpbjsN
CgkJaW50IG1fU29ja2V0Ow0KDQoJCWJvb2wgbV9Jc0Nvbm5lY3RlZDsNCg0KCQkvLyBTZXNz
aW9uIElEIGlzIHVzZWQgdG8gaWRlbnRpZnkgdGhlIG9iamVjdCBpbnN0YW5jZSBieSB0aGUg
Y29ubmVjdGlvbiBtYW5hZ2VyLg0KCQkvLyBpZiBhIHVzZXIgY3JlYXRlcyB0d28gc2Vzc2lv
bnMgd2l0aCB0aGUgc2FtZSBob3N0bmFtZSwgdXNlciBhbmQgcGFzc3dvcmQsIHRoZW4NCgkJ
Ly8gaXQgd2lsbCBzaGFyZSB0aGUgc2FtZSBvYmplY3QgaW5zdGFuY2UsIGJ1dCB3aXRoIGRp
ZmZlcmVudCBjaGFubmVscy4NCgkJaW50IG1fU2Vzc2lvbklEOw0KDQoJCWludCBtX1NTSFNl
cnZlclZlcnNpb247DQoNCiAgICAgICAgSUxvZ2dlciAqbV9Mb2dnZXI7DQp9Ow0KDQojZW5k
aWYgLy9fX1JVTkNPTU1BTkRfQ1NTSFNFU1NJT05fSU5DTFVERURfXw0K
--------------030508020905000304090405
Content-Type: text/plain;
 name="CSSHSession.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename="CSSHSession.cpp"

I2luY2x1ZGUgIkNTU0hTZXNzaW9uLmgiDQojaW5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ZihtX1Nlc3Np
b24gJiYgbV9Jc0Nvbm5lY3RlZCkNCgl7DQoJCWxpYnNzaDJfc2Vzc2lvbl9kaXNjb25uZWN0
KG1fU2Vzc2lvbiwgIk5vcm1hbCBTaHV0ZG93biIpOw0KCQlsaWJzc2gyX3Nlc3Npb25fZnJl
ZShtX1Nlc3Npb24pOw0KCQltX1Nlc3Npb249MDsNCgkJbV9Jc0Nvbm5lY3RlZD1mYWxzZTsN
Cg0KCQljbG9zZXNvY2tldChtX1NvY2tldCk7DQoJCWlmKG1fTG9nZ2VyKQoJCQltX0xvZ2dl
ci0+bG9nKCJTU0ggc2Vzc2lvbiBkaXNjb25uZWN0ZWQgZnJvbSBob3N0ICIgKyBtX0Nvbm5l
Y3Rpb25JbmZvLmhvc3RuYW1lKTsNCgl9DQoNCglyZXR1cm4gdHJ1ZTsNCn0NCg0KQ1NTSFNl
c3Npb246On5DU1NIU2Vzc2lvbigpDQp7DQoJdGhpcy0+ZGlzY29ubmVjdCgpOw0KfQ==
--------------030508020905000304090405
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--------------030508020905000304090405--

From libssh2-devel-bounces@cool.haxx.se  Mon Sep  6 18:49:36 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o86GnSE6025020;
	Mon, 6 Sep 2010 18:49:35 +0200
Received: from dottedmag.net (mail.dottedmag.net [78.46.75.124])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o86GnQNr025008
	for <libssh2-devel@cool.haxx.se>; Mon, 6 Sep 2010 18:49:26 +0200
Received: from leibnitz.dottedmag.net (l49-81-131.cn.ru [178.49.81.131])
	by dottedmag.net (Postfix) with ESMTPSA id 87B5634610C
	for <libssh2-devel@cool.haxx.se>; Mon,  6 Sep 2010 20:49:22 +0400 (MSD)
Received: from dottedmag by leibnitz.dottedmag.net with local (Exim 4.72)
	(envelope-from <dottedmag@leibnitz.dottedmag.net>)
	id 1Osesd-0001Fz-3R
	for libssh2-devel@cool.haxx.se; Mon, 06 Sep 2010 23:49:15 +0700
From: Mikhail Gusarov <dottedmag@dottedmag.net>
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: Libssh2: Use of temporary files
References: <4C8516BB.5D2CE82C@rcom-software.com>
Date: Mon, 06 Sep 2010 23:49:13 +0700
In-Reply-To: <4C8516BB.5D2CE82C@rcom-software.com> (Paul Romero's message of
	"Mon, 06 Sep 2010 09:28:43 -0700")
Message-ID: <87tym2zuk6.fsf@leibnitz.dottedmag.net>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)
MIME-Version: 1.0
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Mon, 06 Sep 2010 18:49:36 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Mon, 06 Sep 2010 18:49:26 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============1469847346=="
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

--===============1469847346==
Content-Type: multipart/signed; boundary="=-=-=";
	micalg=pgp-sha1; protocol="application/pgp-signature"

--=-=-=
Content-Transfer-Encoding: quoted-printable


Twas brillig at 09:28:43 06.09.2010 UTC-07 when paulr@rcom-software.com did=
 gyre and gimble:

 PR> I would like to know if libssh2 creates or writes temporary files
 PR> during the course of its operation.

It does not.

=2D-=20
  http://fossarchy.blogspot.com/

--=-=-=
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQIcBAEBAgAGBQJMhRuKAAoJEJ0g9lA+M4iINS8P/0Det8QrfSP57KOftAZlEL/6
xqj9pcenK/WuUiEPZMDcqOR38jQ5ZXg8gyJjwlItrA75B6TbSyW4A07eNJMrKs3q
Mlw1sSD5A/T9WZLqRaIuQldzBCTwflO7SqVvOF4gdMJUtAgogu5lNu7xO+hpUyL+
PnWsV3fnoc6AX9m2H/GVoveaoJnoAaohw3DrrBGc8K2TunYxtXCHO1gyTfJezZcS
hYNNA6SVSvN5X3uDMSFhQMZPBPShx3adw2pp4mGxYaPGxecjy60slk2Cr+319c6X
3rbQpP8kPVPdUC2aFQnlwvhUl3jdo3pSFQ7e2C8+Frxj+NZcXc80U5Khw+rtCcr+
i/7eVChh1zLdbzpzhGpNHWL1qS/T4pSlsoQk4nWMX0BHnzayUSbU/BLBGskBcYq9
oSBqVrM5QGNu6/VrMfpmN7u9R6jf1Kr3Coal1VbHk72FNkIPl92HOMlQnG9gv78w
fABBs6q2g+y9L2YjN0G219JcfUcJjqjaogwKYob3SRxriCyVsf2DQPcXFXkeswnl
CopLXr2YirtuZPRNIz94kSm8khPRnOYigXy10u1tBzvQfT9mqG9uWJTj2AnCQ7wQ
RKWiW5CgyUDX4xplwZZKmeIfgHD5/Oxprak1/1CpM1lc5GtNu2E9eK6dsRHBO9HQ
v7aLWrTbRN9Io3uJoaqL
=f+EH
-----END PGP SIGNATURE-----
--=-=-=--

--===============1469847346==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============1469847346==--

From libssh2-devel-bounces@cool.haxx.se  Mon Sep  6 18:59:51 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o86Gxfw6029211;
	Mon, 6 Sep 2010 18:59:50 +0200
Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com
	[209.85.216.54])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o86GxdCO029192
	for <libssh2-devel@cool.haxx.se>; Mon, 6 Sep 2010 18:59:39 +0200
Received: by qwg5 with SMTP id 5so4972719qwg.41
	for <libssh2-devel@cool.haxx.se>; Mon, 06 Sep 2010 09:59:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=googlemail.com; s=gamma;
	h=domainkey-signature:mime-version:received:sender:received
	:in-reply-to:references:date:x-google-sender-auth:message-id:subject
	:from:to:content-type;
	bh=71EJWmk6y/+hApVevfomlGqHm/8ALZHoatNBmN2dYq0=;
	b=o5124qGti4FXyAYuQvo51OGDFfmxAgYVqwbQgF0O7ZjBFdZoi7gGPtgQGvP2KY8z6P
	VqbNIGm2tKNvu2dtazvKxIIih5DoVboQO5Mf9OfLsuakO+kRVCkZ4IBNOXYC1kR7+uLh
	BO9c4o+Ar3ua6B9OJqddCxuWShYkXj4bd3fpY=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type;
	b=FBaqpcXVniNk17mMzvp/SYnSEf7Cz6gSo8uL0miLlh6DhoClBVVJd/tqRdDNq/Rkm7
	gwyqKewXUll7NgJaX6CmxYixMUNSW8eTyRp8GWyamB5urO2sD/CzYstX4HyZp+bdQ5LM
	zQLKvHbygOWDozGsKAR6In+84bueOMKr3hPyg=
MIME-Version: 1.0
Received: by 10.229.241.146 with SMTP id le18mr3707933qcb.86.1283792367017;
	Mon, 06 Sep 2010 09:59:27 -0700 (PDT)
Received: by 10.229.73.68 with HTTP; Mon, 6 Sep 2010 09:59:26 -0700 (PDT)
In-Reply-To: <4C851697.1050606@barcelona04.com>
References: <SNT115-W1670983092213680554E2CDA8E0@phx.gbl>
	<4C850DA2.3090709@barcelona04.com>
	<AANLkTim_cmSKJnYNjkanP7L8sxCNYwkm+_z1xks9C+6o@mail.gmail.com>
	<4C851697.1050606@barcelona04.com>
Date: Mon, 6 Sep 2010 17:59:26 +0100
X-Google-Sender-Auth: Q1_GQ9xrA68v0diZJ015DBGpcb4
Message-ID: <AANLkTinPOj+kyK9tfKVeGTVe=e-BWM--c0YVvz8Tf3hr@mail.gmail.com>
Subject: Re: keyboard-interactive method gives access violation in MSVC 2008
From: Alexander Lamaison <swish@lammy.co.uk>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Mon, 06 Sep 2010 18:59:51 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Mon, 06 Sep 2010 18:59:40 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

On 6 September 2010 17:28, Ezequiel Ruiz <eruiz@barcelona04.com> wrote:
... snip

> The code crashes exactly at line 171, when calling
> libssh2_userauth_keyboard_interactive(m_Session, "root", &kbd_callback)

What exactly is the nature of the crash?  Null-pointer, protection
violation etc?  The more information you include from the debugger,
the better.

Alex

--
Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Mon Sep  6 19:19:59 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o86HJnPn010094;
	Mon, 6 Sep 2010 19:19:57 +0200
Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com
	[209.85.216.54])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o86HJkuL010034
	for <libssh2-devel@cool.haxx.se>; Mon, 6 Sep 2010 19:19:46 +0200
Received: by qwg5 with SMTP id 5so4989348qwg.41
	for <libssh2-devel@cool.haxx.se>; Mon, 06 Sep 2010 10:19:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=googlemail.com; s=gamma;
	h=domainkey-signature:mime-version:received:sender:received
	:in-reply-to:references:date:x-google-sender-auth:message-id:subject
	:from:to:content-type:content-transfer-encoding;
	bh=0TYf2g68wgVmKAhvgRKHW/B4Y+GbDXF7NYmmhRKdeKM=;
	b=cJ+Nsd9n9S5bWkZ5qcHlXW5Oqt2CQsBX4282csVQ1sMrBzshjBK+wAos5GmrvwayEG
	FSDL8H5MwcQYfs/5/t+qttaTcPD3v5frkqOtUAIuZoUBLk/pFs6V6BXupw2ZRpNtNyQy
	m8K3UScmG35xBuZdu3si8HwZh+bPjrenevxK4=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type
	:content-transfer-encoding;
	b=hdIAq9thgomtAGMSV4Ga72H5MOsDFOtAvY3QlaLmPAhReJxlvADwEq+kjvkcbNlFLM
	nXnMlm51NOnot/F+tJgaklcLqbCbxz/eEs+sFPC0YJCe8QzMuO7Q541HNOFOqoMnyoF2
	18aD60MsC0AcgWbLNHLiPdPN7JfS4IzVBAxQk=
MIME-Version: 1.0
Received: by 10.229.52.8 with SMTP id f8mr2792850qcg.286.1283793577809; Mon,
	06 Sep 2010 10:19:37 -0700 (PDT)
Received: by 10.229.73.68 with HTTP; Mon, 6 Sep 2010 10:19:37 -0700 (PDT)
In-Reply-To: <4C85212C.3040904@barcelona04.com>
References: <SNT115-W1670983092213680554E2CDA8E0@phx.gbl>
	<4C850DA2.3090709@barcelona04.com>
	<AANLkTim_cmSKJnYNjkanP7L8sxCNYwkm+_z1xks9C+6o@mail.gmail.com>
	<4C851697.1050606@barcelona04.com>
	<AANLkTinPOj+kyK9tfKVeGTVe=e-BWM--c0YVvz8Tf3hr@mail.gmail.com>
	<4C85212C.3040904@barcelona04.com>
Date: Mon, 6 Sep 2010 18:19:37 +0100
X-Google-Sender-Auth: 6hq0wgZP7JAjQKm3psIdsgWPhDA
Message-ID: <AANLkTinJoUOfVMbOFyR99z62oDU+LiT2q7bZiewmkRGq@mail.gmail.com>
Subject: Re: keyboard-interactive method gives access violation in MSVC 2008
From: Alexander Lamaison <swish@lammy.co.uk>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Mon, 06 Sep 2010 19:19:59 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Mon, 06 Sep 2010 19:19:47 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

On 6 September 2010 18:13, Ezequiel Ruiz <eruiz@barcelona04.com> wrote:
> =A0mm, the exact error message is:
>
> Unhandled exception at 0x77d6e1fe in Test.exe: 0xC0000005: Access violati=
on
> reading location 0x44ed6d96.
>
> The Test.exe is just an exe creating an instance of this class, and calli=
ng
> the open() method.

If you zip up a VS solution for this Test.exe, I'll try to debug it.

Alex

--
Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Mon Sep  6 19:29:16 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o86HTCp7015602;
	Mon, 6 Sep 2010 19:29:15 +0200
Received: from mail2.barcelona04.com (mx2.barcelona04.com [190.139.108.163])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o86HT9Ee015554
	for <libssh2-devel@cool.haxx.se>; Mon, 6 Sep 2010 19:29:10 +0200
X-Spam-Status: No, hits=0.0 required=4.0
	tests=BAYES_00: -1.665, CUSTOM_RULE_FROM: ALLOW, TOTAL_SCORE: -1.665,
	autolearn=ham
X-Spam-Level: 
Received: from localhost ([127.0.0.1]) by mail2.barcelona04.com;
	Mon, 6 Sep 2010 14:16:28 -0300
Message-ID: <4C85212C.3040904@barcelona04.com>
Date: Mon, 06 Sep 2010 14:13:16 -0300
From: Ezequiel Ruiz <eruiz@barcelona04.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; es-AR;
	rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2
MIME-Version: 1.0
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: keyboard-interactive method gives access violation in MSVC 2008
References: <SNT115-W1670983092213680554E2CDA8E0@phx.gbl>	<4C850DA2.3090709@barcelona04.com>	<AANLkTim_cmSKJnYNjkanP7L8sxCNYwkm+_z1xks9C+6o@mail.gmail.com>	<4C851697.1050606@barcelona04.com>
	<AANLkTinPOj+kyK9tfKVeGTVe=e-BWM--c0YVvz8Tf3hr@mail.gmail.com>
In-Reply-To: <AANLkTinPOj+kyK9tfKVeGTVe=e-BWM--c0YVvz8Tf3hr@mail.gmail.com>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Mon, 06 Sep 2010 19:29:16 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Mon, 06 Sep 2010 19:29:11 +0200 (CEST)
Cc: Alexander Lamaison <swish@lammy.co.uk>
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

  mm, the exact error message is:

Unhandled exception at 0x77d6e1fe in Test.exe: 0xC0000005: Access =

violation reading location 0x44ed6d96.

The Test.exe is just an exe creating an instance of this class, and =

calling the open() method.

An important update: I was trying to debug this at a lower level, so =

I've compiled the libssh2 with debugging symbols to find more info =

before the crash, and then the application worked!. So I recompiled it =

back to release mode, and the access violation was still there. So, in =

other words: the error just happen when the libssh2.dll is compiled in =

release mode, in debug mode works OK. Perhaps some uninitialized =

variables? or some problems with the optimizations of the MSVC compiler?
I' really don't know. Unfortunatelly, we don't have valgrind for windows...

Ezequiel

El 06/09/2010 01:59 p.m., Alexander Lamaison escribi=F3:
> On 6 September 2010 17:28, Ezequiel Ruiz<eruiz@barcelona04.com>  wrote:
> ... snip
>
>> The code crashes exactly at line 171, when calling
>> libssh2_userauth_keyboard_interactive(m_Session, "root",&kbd_callback)
> What exactly is the nature of the crash?  Null-pointer, protection
> violation etc?  The more information you include from the debugger,
> the better.
>
> Alex
>
> --
> Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


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

From libssh2-devel-bounces@cool.haxx.se  Mon Sep  6 20:33:25 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o86IX9xd031688;
	Mon, 6 Sep 2010 20:33:22 +0200
Received: from mail2.barcelona04.com (mx2.barcelona04.com [190.139.108.163])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o86IX68Q031681
	for <libssh2-devel@cool.haxx.se>; Mon, 6 Sep 2010 20:33:07 +0200
X-Spam-Status: No, hits=0.0 required=4.0
	tests=BAYES_00: -1.665, CUSTOM_RULE_FROM: ALLOW, TOTAL_SCORE: -1.665,
	autolearn=ham
X-Spam-Level: 
Received: from localhost ([127.0.0.1]) by mail2.barcelona04.com;
	Mon, 6 Sep 2010 15:36:03 -0300
Message-ID: <4C8533D3.1080707@barcelona04.com>
Date: Mon, 06 Sep 2010 15:32:51 -0300
From: Ezequiel Ruiz <eruiz@barcelona04.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; es-AR;
	rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2
MIME-Version: 1.0
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: keyboard-interactive method gives access violation in MSVC 2008
References: <SNT115-W1670983092213680554E2CDA8E0@phx.gbl>	<4C850DA2.3090709@barcelona04.com>	<AANLkTim_cmSKJnYNjkanP7L8sxCNYwkm+_z1xks9C+6o@mail.gmail.com>	<4C851697.1050606@barcelona04.com>	<AANLkTinPOj+kyK9tfKVeGTVe=e-BWM--c0YVvz8Tf3hr@mail.gmail.com>	<4C85212C.3040904@barcelona04.com>
	<AANLkTinJoUOfVMbOFyR99z62oDU+LiT2q7bZiewmkRGq@mail.gmail.com>
In-Reply-To: <AANLkTinJoUOfVMbOFyR99z62oDU+LiT2q7bZiewmkRGq@mail.gmail.com>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Mon, 06 Sep 2010 20:33:25 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Mon, 06 Sep 2010 20:33:07 +0200 (CEST)
Cc: Alexander Lamaison <swish@lammy.co.uk>
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

  I've compiled the release DLL but changed some parameters, now I can =

obtain some extra info.
The exact line where the error happens is line 1588 in userauth.c:

Although "session->userauth_kybd_responses" is not a bad pointer (I can =

see the right password in the text variable, and the apropiate length) , =

it returns the access violation when calling LIBSSH2_FREE for that =

object (line 1588). The text was allocated by using _strdup, and not =

deleted at all, I've also tried with _malloc (which is the same).
I've seen that the LIBSSH2_FREE means "session->free((ptr), =

&(session)->abstract)". So, after calling this method, the code hangs at =

line 51 of free.c (in MSVC implementation...), which is part of the =

function void __cdecl _free_base (void * pBlock). The exact line is: =

         retval =3D HeapFree(_crtheap, 0, pBlock). So, the question is: =

Why is the debug target working OK?. I don't know what else we may =

extract from the debugger at this point. But I recognize I don't know =

the internal architecture of libssh2 at all, so perhaps I'm not =

researching in the right place.

If you still want the solution, I may prepare a zip for you.

Regards,

Ezequiel

El 06/09/2010 02:19 p.m., Alexander Lamaison escribi=F3:
> On 6 September 2010 18:13, Ezequiel Ruiz<eruiz@barcelona04.com>  wrote:
>>   mm, the exact error message is:
>>
>> Unhandled exception at 0x77d6e1fe in Test.exe: 0xC0000005: Access violat=
ion
>> reading location 0x44ed6d96.
>>
>> The Test.exe is just an exe creating an instance of this class, and call=
ing
>> the open() method.
> If you zip up a VS solution for this Test.exe, I'll try to debug it.
>
> Alex
>
> --
> Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


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

From libssh2-devel-bounces@cool.haxx.se  Mon Sep  6 20:44:41 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o86IiZf5005402;
	Mon, 6 Sep 2010 20:44:40 +0200
Received: from dottedmag.net (mail.dottedmag.net [78.46.75.124])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o86IiXx4005397
	for <libssh2-devel@cool.haxx.se>; Mon, 6 Sep 2010 20:44:33 +0200
Received: from leibnitz.dottedmag.net (l49-81-131.cn.ru [178.49.81.131])
	by dottedmag.net (Postfix) with ESMTPSA id E540D34610C;
	Mon,  6 Sep 2010 22:44:28 +0400 (MSD)
Received: from dottedmag by leibnitz.dottedmag.net with local (Exim 4.72)
	(envelope-from <dottedmag@leibnitz.dottedmag.net>)
	id 1Osgg6-0005JZ-Ny; Tue, 07 Sep 2010 01:44:26 +0700
From: Mikhail Gusarov <dottedmag@dottedmag.net>
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: keyboard-interactive method gives access violation in MSVC 2008
References: <SNT115-W1670983092213680554E2CDA8E0@phx.gbl>
	<4C850DA2.3090709@barcelona04.com>
	<AANLkTim_cmSKJnYNjkanP7L8sxCNYwkm+_z1xks9C+6o@mail.gmail.com>
	<4C851697.1050606@barcelona04.com>
	<AANLkTinPOj+kyK9tfKVeGTVe=e-BWM--c0YVvz8Tf3hr@mail.gmail.com>
	<4C85212C.3040904@barcelona04.com>
	<AANLkTinJoUOfVMbOFyR99z62oDU+LiT2q7bZiewmkRGq@mail.gmail.com>
	<4C8533D3.1080707@barcelona04.com>
Date: Tue, 07 Sep 2010 01:44:26 +0700
In-Reply-To: <4C8533D3.1080707@barcelona04.com> (Ezequiel Ruiz's message of
	"Mon, 06 Sep 2010 15:32:51 -0300")
Message-ID: <87hbi2zp85.fsf@leibnitz.dottedmag.net>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)
MIME-Version: 1.0
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Mon, 06 Sep 2010 20:44:41 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Mon, 06 Sep 2010 20:44:34 +0200 (CEST)
Cc: Alexander Lamaison <swish@lammy.co.uk>
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============1991837971=="
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

--===============1991837971==
Content-Type: multipart/signed; boundary="=-=-=";
	micalg=pgp-sha1; protocol="application/pgp-signature"

--=-=-=
Content-Transfer-Encoding: quoted-printable


Twas brillig at 15:32:51 06.09.2010 UTC-03 when eruiz@barcelona04.com
did gyre and gimble:

 ER> Although "session->userauth_kybd_responses" is not a bad pointer (I ca=
n see the
 ER> right password in the text variable, and the apropiate length) , it re=
turns the
 ER> access violation when calling LIBSSH2_FREE for that object (line 1588)=
. The text
 ER> was allocated by using _strdup, and not deleted at all, I've also trie=
d with
 ER> _malloc (which is the same).

Very likely it is well-known problem malloc-in-EXE-free-in-DLL under
Win32. Try to provide your own alloc/free/realloc functions to
libssh2_session_init_ex, which just forward calls to malloc/free/realloc.

=2D-=20
  http://fossarchy.blogspot.com/

--=-=-=
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQIcBAEBAgAGBQJMhTaKAAoJEJ0g9lA+M4iI8YkP+gLcFRVuWDrm8Qkj8SFNf+DF
SWy6/FTKcUx6Kp5Ku/fGtWVtA9g+0B/XMkD5aOsY/0ntULC4XWkglMJxYUmGGV+A
FriBiaqkootdmrrcab9q3deXqthPhoFpI/ikXJYTQmVtt6nOedYvxuvW57be/wcp
XX9NFqUXnbj3rR/pZntka4fEiJuc8kx6k5S+ItbmXU0ERkJHqq0KSTzSJrVrapHG
yJkgvOGe9b1NzdgPaESg0oNdI5qw+hDfL134aEa7iVu5+hBbBE++tbxjKaFZLV7b
6Wl+pI8U6n5bOzcpl5YqRqiR42D2T/1m4lizoB6e9anlMSsNFc3zHHMs17EeoEDs
4YggQ1AkDkdwP/VviBTPwmHKZLOK4nkYwZILvSunoIetLy1hrPpcglOe12xCPMIV
CVc1LVmHHpQtveBGnBh9oSmwu9c7Q8ucYHo0qV4Qusrci1uj1/lJ6W9t0rAcQfBp
QqEGfzhdCd8/I1Nvr9FCYKjpFHn3SHPSEyBbhsK7RqGEhwPfjAVLXTnsd5I8BVoF
C6OynFObCqI1pvrQ9nDuRSKk05n99Bm6XLlMUW3ngnLsGBnoA6W6MXNecJ9Z2i/M
lwHtTmSodrk0HlGMnw3bBSJjYxkBNDL8u0uin6iJcUsWtQ9vAjPTDOq1yuiyNiEm
qtwtruJhIh0OOU6thmy0
=+MC5
-----END PGP SIGNATURE-----
--=-=-=--

--===============1991837971==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============1991837971==--

From libssh2-devel-bounces@cool.haxx.se  Mon Sep  6 22:09:39 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o86K8rDE031064;
	Mon, 6 Sep 2010 22:09:35 +0200
Received: from mail2.barcelona04.com (mx2.barcelona04.com [190.139.108.163])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o86K8oti031002
	for <libssh2-devel@cool.haxx.se>; Mon, 6 Sep 2010 22:08:51 +0200
X-Spam-Status: No, hits=0.0 required=4.0
	tests=AWL: -0.000,BAYES_00: -1.665,HTML_MESSAGE: 0.001,
	CUSTOM_RULE_FROM: ALLOW,TOTAL_SCORE: -1.665,autolearn=ham
X-Spam-Level: 
Received: from localhost ([127.0.0.1]) by mail2.barcelona04.com;
	Mon, 6 Sep 2010 17:05:57 -0300
Message-ID: <4C8548E6.2020200@barcelona04.com>
Date: Mon, 06 Sep 2010 17:02:46 -0300
From: Ezequiel Ruiz <eruiz@barcelona04.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; es-AR;
	rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2
MIME-Version: 1.0
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: keyboard-interactive method gives access violation in MSVC 2008
References: <SNT115-W1670983092213680554E2CDA8E0@phx.gbl>	<4C850DA2.3090709@barcelona04.com>	<AANLkTim_cmSKJnYNjkanP7L8sxCNYwkm+_z1xks9C+6o@mail.gmail.com>	<4C851697.1050606@barcelona04.com>	<AANLkTinPOj+kyK9tfKVeGTVe=e-BWM--c0YVvz8Tf3hr@mail.gmail.com>	<4C85212C.3040904@barcelona04.com>	<AANLkTinJoUOfVMbOFyR99z62oDU+LiT2q7bZiewmkRGq@mail.gmail.com>	<4C8533D3.1080707@barcelona04.com>
	<87hbi2zp85.fsf@leibnitz.dottedmag.net>
In-Reply-To: <87hbi2zp85.fsf@leibnitz.dottedmag.net>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Mon, 06 Sep 2010 22:09:39 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Mon, 06 Sep 2010 22:08:52 +0200 (CEST)
Cc: Mikhail Gusarov <dottedmag@dottedmag.net>,
        Alexander Lamaison <swish@lammy.co.uk>
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============1355106771=="
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

This is a multi-part message in MIME format.
--===============1355106771==
Content-Type: multipart/alternative;
 boundary="------------070508010900030507040400"

This is a multi-part message in MIME format.
--------------070508010900030507040400
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

  You're right. I've changed the memory allocator and the problem 
disappeared! I can't believe MSVC is still having this kind of limitations.
Well, thank you very much for your help!

Ezequiel

El 06/09/2010 03:44 p.m., Mikhail Gusarov escribió:
> Twas brillig at 15:32:51 06.09.2010 UTC-03 when eruiz@barcelona04.com
> did gyre and gimble:
>
>   ER>  Although "session->userauth_kybd_responses" is not a bad pointer (I can see the
>   ER>  right password in the text variable, and the apropiate length) , it returns the
>   ER>  access violation when calling LIBSSH2_FREE for that object (line 1588). The text
>   ER>  was allocated by using _strdup, and not deleted at all, I've also tried with
>   ER>  _malloc (which is the same).
>
> Very likely it is well-known problem malloc-in-EXE-free-in-DLL under
> Win32. Try to provide your own alloc/free/realloc functions to
> libssh2_session_init_ex, which just forward calls to malloc/free/realloc.
>
>
>
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


--------------070508010900030507040400
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    You're right. I've changed the memory allocator and the problem
    disappeared! I can't believe MSVC is still having this kind of
    limitations.<br>
    Well, thank you very much for your help!<br>
    <br>
    Ezequiel<br>
    <br>
    El 06/09/2010 03:44 p.m., Mikhail Gusarov escribi&oacute;:
    <blockquote cite="mid:87hbi2zp85.fsf@leibnitz.dottedmag.net"
      type="cite">
      <pre wrap="">
Twas brillig at 15:32:51 06.09.2010 UTC-03 when <a class="moz-txt-link-abbreviated" href="mailto:eruiz@barcelona04.com">eruiz@barcelona04.com</a>
did gyre and gimble:

 ER&gt; Although "session-&gt;userauth_kybd_responses" is not a bad pointer (I can see the
 ER&gt; right password in the text variable, and the apropiate length) , it returns the
 ER&gt; access violation when calling LIBSSH2_FREE for that object (line 1588). The text
 ER&gt; was allocated by using _strdup, and not deleted at all, I've also tried with
 ER&gt; _malloc (which is the same).

Very likely it is well-known problem malloc-in-EXE-free-in-DLL under
Win32. Try to provide your own alloc/free/realloc functions to
libssh2_session_init_ex, which just forward calls to malloc/free/realloc.

</pre>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
libssh2-devel <a class="moz-txt-link-freetext" href="http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel">http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>

--------------070508010900030507040400--


--===============1355106771==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============1355106771==--

From libssh2-devel-bounces@cool.haxx.se  Mon Sep  6 22:38:03 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o86Kbual016792;
	Mon, 6 Sep 2010 22:38:02 +0200
Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com
	[209.85.216.175])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o86KbrpI016750
	for <libssh2-devel@cool.haxx.se>; Mon, 6 Sep 2010 22:37:54 +0200
Received: by qyk31 with SMTP id 31so2943179qyk.20
	for <libssh2-devel@cool.haxx.se>; Mon, 06 Sep 2010 13:37:44 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=googlemail.com; s=gamma;
	h=domainkey-signature:mime-version:received:sender:received
	:in-reply-to:references:date:x-google-sender-auth:message-id:subject
	:from:to:content-type:content-transfer-encoding;
	bh=wWw5aAK00fnNU6+uIxhAAzVT56+BX/niN7n7rdc9qec=;
	b=vzFUUsGFBNX6wD5QwyMJNfFeMWt7KFRcbJc+n+gb8dtMI1wSIthodIotXglrygwWT8
	f+VS1Sh8Tr+9lW47Ixu7k43/QZJ4VNczis0ArmxwgAPhNQLGS+QcVaaYHXNWwiVqOoan
	qk5E/pWo11iH7I9i+t/TZ+oK0ynKmWt0/qn8I=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type
	:content-transfer-encoding;
	b=H1cuZf7CVtS9VcjwWqyLl61zqC8CaWPK5T2QOhBAAGI+GfqTfd3U8IC9ROtBC0bENK
	94DRN9hkxH92024K+k6wj01NmQHngKvluvsJBzrQ7261j5DSuU2t6Ee9dMfMJo1KLsZo
	cLlF0tAOJVXIa86zPQURsDQTXsS/ijcJ8gYpA=
MIME-Version: 1.0
Received: by 10.229.2.32 with SMTP id 32mr2956909qch.270.1283805464453; Mon,
	06 Sep 2010 13:37:44 -0700 (PDT)
Received: by 10.229.73.68 with HTTP; Mon, 6 Sep 2010 13:37:44 -0700 (PDT)
In-Reply-To: <4C8548E6.2020200@barcelona04.com>
References: <SNT115-W1670983092213680554E2CDA8E0@phx.gbl>
	<4C850DA2.3090709@barcelona04.com>
	<AANLkTim_cmSKJnYNjkanP7L8sxCNYwkm+_z1xks9C+6o@mail.gmail.com>
	<4C851697.1050606@barcelona04.com>
	<AANLkTinPOj+kyK9tfKVeGTVe=e-BWM--c0YVvz8Tf3hr@mail.gmail.com>
	<4C85212C.3040904@barcelona04.com>
	<AANLkTinJoUOfVMbOFyR99z62oDU+LiT2q7bZiewmkRGq@mail.gmail.com>
	<4C8533D3.1080707@barcelona04.com>
	<87hbi2zp85.fsf@leibnitz.dottedmag.net>
	<4C8548E6.2020200@barcelona04.com>
Date: Mon, 6 Sep 2010 21:37:44 +0100
X-Google-Sender-Auth: A-39mt8hI95Tnvb7nK7HJhyM31k
Message-ID: <AANLkTimdMsDLsGjGFrK-oMn33p1Pb9p=3t=0wsM=s2OP@mail.gmail.com>
Subject: Re: keyboard-interactive method gives access violation in MSVC 2008
From: Alexander Lamaison <swish@lammy.co.uk>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Mon, 06 Sep 2010 22:38:03 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Mon, 06 Sep 2010 22:37:54 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

> El 06/09/2010 03:44 p.m., Mikhail Gusarov escribi=F3:
>
> Very likely it is well-known problem malloc-in-EXE-free-in-DLL under
> Win32. Try to provide your own alloc/free/realloc functions to
> libssh2_session_init_ex, which just forward calls to malloc/free/realloc.

On 6 September 2010 21:02, Ezequiel Ruiz <eruiz@barcelona04.com> wrote:
> You're right. I've changed the memory allocator and the problem disappear=
ed!
> I can't believe MSVC is still having this kind of limitations.

This isn't an MSVC problem or even a Windows problem though it is
often reported that way.  It will happen with _any_ compiler on _any_
OS if two shared libraries are linked against different versions of
the C runtime and objects owned by one runtime are shared with the
other.  The reason this seems like a Windows problem is that this
mixed-runtime situation is common on Windows but rare on Linux.

Therefore never:

 - allocate memory in one module (DLL/shared library) and free it in another
   (your current problem).  This adds an entry to the heap table in one loa=
ded
   runtime and tries to remove the entry (which won't exist) in another
   runtime's table. Crash!

 - pass a FILE* handle created by one runtime across a module boundary
   into another.  When the second module uses it it will try to update the =
entry
   in the file handle table which doesn't exist in that runtime
instance.  Crash!
   NOTE: libssh2's API includes several functions that take a FILE* paramet=
er.
         Don't use them, especially on Windows unless, you link statically
         or are sure your modules are linked against the same version of the
         C runtime.

Alex

--
Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Tue Sep  7 06:10:50 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o874A3xp019297;
	Tue, 7 Sep 2010 06:10:44 +0200
Received: from dottedmag.net (mail.dottedmag.net [78.46.75.124])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o874A0Kp019133
	for <libssh2-devel@cool.haxx.se>; Tue, 7 Sep 2010 06:10:00 +0200
Received: from leibnitz.dottedmag.net (l49-81-131.cn.ru [178.49.81.131])
	by dottedmag.net (Postfix) with ESMTPSA id DA83234610C
	for <libssh2-devel@cool.haxx.se>; Tue,  7 Sep 2010 08:09:59 +0400 (MSD)
Received: from dottedmag by leibnitz.dottedmag.net with local (Exim 4.72)
	(envelope-from <dottedmag@leibnitz.dottedmag.net>)
	id 1OspVN-0002JN-10
	for libssh2-devel@cool.haxx.se; Tue, 07 Sep 2010 11:09:57 +0700
From: Mikhail Gusarov <dottedmag@dottedmag.net>
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: keyboard-interactive method gives access violation in MSVC 2008
References: <SNT115-W1670983092213680554E2CDA8E0@phx.gbl>
	<4C850DA2.3090709@barcelona04.com>
	<AANLkTim_cmSKJnYNjkanP7L8sxCNYwkm+_z1xks9C+6o@mail.gmail.com>
	<4C851697.1050606@barcelona04.com>
	<AANLkTinPOj+kyK9tfKVeGTVe=e-BWM--c0YVvz8Tf3hr@mail.gmail.com>
	<4C85212C.3040904@barcelona04.com>
	<AANLkTinJoUOfVMbOFyR99z62oDU+LiT2q7bZiewmkRGq@mail.gmail.com>
	<4C8533D3.1080707@barcelona04.com>
	<87hbi2zp85.fsf@leibnitz.dottedmag.net>
	<4C8548E6.2020200@barcelona04.com>
	<AANLkTimdMsDLsGjGFrK-oMn33p1Pb9p=3t=0wsM=s2OP@mail.gmail.com>
Date: Tue, 07 Sep 2010 11:09:56 +0700
In-Reply-To: <AANLkTimdMsDLsGjGFrK-oMn33p1Pb9p=3t=0wsM=s2OP@mail.gmail.com>
	(Alexander Lamaison's message of "Mon, 6 Sep 2010 21:37:44 +0100")
Message-ID: <87aanuyz1n.fsf@leibnitz.dottedmag.net>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)
MIME-Version: 1.0
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Tue, 07 Sep 2010 06:10:49 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Tue, 07 Sep 2010 06:10:00 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0612666415=="
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

--===============0612666415==
Content-Type: multipart/signed; boundary="=-=-=";
	micalg=pgp-sha1; protocol="application/pgp-signature"

--=-=-=
Content-Transfer-Encoding: quoted-printable


Twas brillig at 21:37:44 06.09.2010 UTC+01 when swish@lammy.co.uk did gyre =
and gimble:

 AL> This isn't an MSVC problem or even a Windows problem though it is
 AL> often reported that way.  It will happen with _any_ compiler on _any_
 AL> OS if two shared libraries are linked against different versions of
 AL> the C runtime and objects owned by one runtime are shared with the
 AL> other.

If and only if C runtime implementation is stupid and does not handle
this situation.

MSVC one is.

=2D-=20
  http://fossarchy.blogspot.com/

--=-=-=
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQIcBAEBAgAGBQJMhbsUAAoJEJ0g9lA+M4iIvf4QAJlw0EFUBg5kO24ot5wWoyiC
9rtw7ivNkwK20yqgt1vjfZp4aFO6zKr+OZie+OSByKa4IV6lTzrh/zqz9H4drS+j
0TSaPjw8B1CtbrY+0Bon/kPsuNnEHAgP96RfZa6b2tKV1BdMV8fREhWLA+Tann8w
Vhhk1bSfcUACnVItgeZ8katBvnMJc0IkMhIsYy4xMh0iMh+/wvdyMZaMe5melr1l
na7XDuBIskxLL/1gx9+UVi5ORq9UiM9RlXaNfEptPYuFo9TWVukRAgHXuSLUhM7H
bGRmlhkPAtw3Oo1pyKnIQD4h+WHoHOu4qETr2vfXgw6meplKlevVetc4S32LL1IE
iCJxonzawcc67V0/EEuuDYwWJP46omPN3nBafJEAzG7yANC5198MKn1uroX3Xpct
/IXQr9iKA9PEz5nwJAnuKm46aRWNkmZx8+vRXV5IGlR2j5OTEY097gWrPtMWpG46
b1m0fqIBj23QXsc25kiTDRXR/xMBOBAwyJQ4QuNTRTklL/tNeqyUhZX/uMCU/qrS
aS1V1uabK/3xZbibNdYFMR5Uf9p3DiA3tLSsXt5CZw8YOkb2I3YoqhDHNoKMFCm/
dYUx7lVChEB+wSpnCDg4+aIfzv9brlvkW9kH04HXdfo0iJcQleD0SIQIVnqzNG4N
EcePFQZLZqgs2/q1QtST
=YhQt
-----END PGP SIGNATURE-----
--=-=-=--

--===============0612666415==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============0612666415==--

From libssh2-devel-bounces@cool.haxx.se  Tue Sep  7 13:52:58 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o87BqCxs008709;
	Tue, 7 Sep 2010 13:52:53 +0200
Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com
	[209.85.216.182])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o87Bq9Dq008683
	for <libssh2-devel@cool.haxx.se>; Tue, 7 Sep 2010 13:52:11 +0200
Received: by qyk4 with SMTP id 4so5616506qyk.20
	for <libssh2-devel@cool.haxx.se>; Tue, 07 Sep 2010 04:52:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=googlemail.com; s=gamma;
	h=domainkey-signature:mime-version:received:sender:received
	:in-reply-to:references:date:x-google-sender-auth:message-id:subject
	:from:to:content-type:content-transfer-encoding;
	bh=XDOz/sZ/AfNZ4rvBmwxo8/Bo32oXGAbbjw4phnWNCQo=;
	b=QVZoyeQ9487ZzjjB0MSlz0DY+tpkGcv7IHCKnSQ5ouGJzvjV7VMrhuphePmpr55qqN
	t43dvUxhmXFVEflDAIP9/o7qD/AcvvspRx4qWVrvJu9mNHawyfpTDBI6yk1hzOXIpnh+
	EfAOlu+7WVL/K8M1FT9oPqvzh6qPLp7ZdWfg0=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type
	:content-transfer-encoding;
	b=JBfMDLV/HRF3J7NBTCmjuxn86BXIamAhwohlKk0C65d94PDEHZgAOblBgD0jp2RnYK
	t8lSKRpP81iAOw1KGKBObeRK1xsbOadU/mx+LHfHqLQLhia9yLcIITlHYvl1Uyy7nsKB
	uMnWWRN3Mw3b1a+LvGMky/Be5wmraXQjhdH5c=
MIME-Version: 1.0
Received: by 10.224.79.170 with SMTP id p42mr618835qak.81.1283860321345; Tue,
	07 Sep 2010 04:52:01 -0700 (PDT)
Received: by 10.229.73.68 with HTTP; Tue, 7 Sep 2010 04:52:01 -0700 (PDT)
In-Reply-To: <87aanuyz1n.fsf@leibnitz.dottedmag.net>
References: <SNT115-W1670983092213680554E2CDA8E0@phx.gbl>
	<4C850DA2.3090709@barcelona04.com>
	<AANLkTim_cmSKJnYNjkanP7L8sxCNYwkm+_z1xks9C+6o@mail.gmail.com>
	<4C851697.1050606@barcelona04.com>
	<AANLkTinPOj+kyK9tfKVeGTVe=e-BWM--c0YVvz8Tf3hr@mail.gmail.com>
	<4C85212C.3040904@barcelona04.com>
	<AANLkTinJoUOfVMbOFyR99z62oDU+LiT2q7bZiewmkRGq@mail.gmail.com>
	<4C8533D3.1080707@barcelona04.com>
	<87hbi2zp85.fsf@leibnitz.dottedmag.net>
	<4C8548E6.2020200@barcelona04.com>
	<AANLkTimdMsDLsGjGFrK-oMn33p1Pb9p=3t=0wsM=s2OP@mail.gmail.com>
	<87aanuyz1n.fsf@leibnitz.dottedmag.net>
Date: Tue, 7 Sep 2010 12:52:01 +0100
X-Google-Sender-Auth: FkpZnofOiSHL_7fuL1n48CzDD34
Message-ID: <AANLkTi=HWd4CMEHFaf6+9JmZaiH+k=Bgjk182Qv-cXEf@mail.gmail.com>
Subject: Re: keyboard-interactive method gives access violation in MSVC 2008
From: Alexander Lamaison <swish@lammy.co.uk>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Tue, 07 Sep 2010 13:52:58 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Tue, 07 Sep 2010 13:52:11 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

On 7 September 2010 05:09, Mikhail Gusarov <dottedmag@dottedmag.net> wrote:
>
> Twas brillig at 21:37:44 06.09.2010 UTC+01 when swish@lammy.co.uk did gyr=
e and gimble:
>
> =A0AL> This isn't an MSVC problem or even a Windows problem though it is
> =A0AL> often reported that way. =A0It will happen with _any_ compiler on =
_any_
> =A0AL> OS if two shared libraries are linked against different versions of
> =A0AL> the C runtime and objects owned by one runtime are shared with the
> =A0AL> other.
>
> If and only if C runtime implementation is stupid and does not handle
> this situation.

How can two independently loaded modules pool their data?  I'm not
disagreeing, just curious.

Alex

--
Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Tue Sep  7 15:25:51 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o87DPZ5a010135;
	Tue, 7 Sep 2010 15:25:49 +0200
Received: from dottedmag.net (mail.dottedmag.net [78.46.75.124])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o87DPXWU010110
	for <libssh2-devel@cool.haxx.se>; Tue, 7 Sep 2010 15:25:33 +0200
Received: from leibnitz.dottedmag.net (l49-81-131.cn.ru [178.49.81.131])
	by dottedmag.net (Postfix) with ESMTPSA id 9DFA434610C
	for <libssh2-devel@cool.haxx.se>; Tue,  7 Sep 2010 17:25:28 +0400 (MSD)
Received: from dottedmag by leibnitz.dottedmag.net with local (Exim 4.72)
	(envelope-from <dottedmag@leibnitz.dottedmag.net>)
	id 1OsyAw-0001O9-NR
	for libssh2-devel@cool.haxx.se; Tue, 07 Sep 2010 20:25:26 +0700
From: Mikhail Gusarov <dottedmag@dottedmag.net>
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: keyboard-interactive method gives access violation in MSVC 2008
References: <SNT115-W1670983092213680554E2CDA8E0@phx.gbl>
	<4C850DA2.3090709@barcelona04.com>
	<AANLkTim_cmSKJnYNjkanP7L8sxCNYwkm+_z1xks9C+6o@mail.gmail.com>
	<4C851697.1050606@barcelona04.com>
	<AANLkTinPOj+kyK9tfKVeGTVe=e-BWM--c0YVvz8Tf3hr@mail.gmail.com>
	<4C85212C.3040904@barcelona04.com>
	<AANLkTinJoUOfVMbOFyR99z62oDU+LiT2q7bZiewmkRGq@mail.gmail.com>
	<4C8533D3.1080707@barcelona04.com>
	<87hbi2zp85.fsf@leibnitz.dottedmag.net>
	<4C8548E6.2020200@barcelona04.com>
	<AANLkTimdMsDLsGjGFrK-oMn33p1Pb9p=3t=0wsM=s2OP@mail.gmail.com>
	<87aanuyz1n.fsf@leibnitz.dottedmag.net>
	<AANLkTi=HWd4CMEHFaf6+9JmZaiH+k=Bgjk182Qv-cXEf@mail.gmail.com>
Date: Tue, 07 Sep 2010 20:25:26 +0700
In-Reply-To: <AANLkTi=HWd4CMEHFaf6+9JmZaiH+k=Bgjk182Qv-cXEf@mail.gmail.com>
	(Alexander Lamaison's message of "Tue, 7 Sep 2010 12:52:01 +0100")
Message-ID: <871v95znw9.fsf@leibnitz.dottedmag.net>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)
MIME-Version: 1.0
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Tue, 07 Sep 2010 15:25:51 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Tue, 07 Sep 2010 15:25:33 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0258273437=="
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

--===============0258273437==
Content-Type: multipart/signed; boundary="=-=-=";
	micalg=pgp-sha1; protocol="application/pgp-signature"

--=-=-=
Content-Transfer-Encoding: quoted-printable


Twas brillig at 12:52:01 07.09.2010 UTC+01 when swish@lammy.co.uk did gyre =
and gimble:

 >> If and only if C runtime implementation is stupid and does not handle
 >> this situation.

 AL> How can two independently loaded modules pool their data?  I'm not
 AL> disagreeing, just curious.

Using third (common) module comes to mind. Not sure is it feasible though.

=2D-=20
  http://fossarchy.blogspot.com/

--=-=-=
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQIcBAEBAgAGBQJMhj1GAAoJEJ0g9lA+M4iIaRAP/3T4MUGRdUIxr7zxVbF2f1ps
r4yn9sVm1NAg0dYkHHrRhk7WUcPsVIH8iqz/hSMJsJ/XjtbzsuQSjUrmLxJWVqci
FqsYnLrHMu5WISDcjG4HHxsUFjMbOyTIYpJe5NukMjWw5iiQBxzkCTJtVR4i/Qez
E/wzgELY+vW/QgdBPYNPjD3fpM9vkKzBUJTvcOEsrfMRGm4vwkps2B25Wy6CWxHa
I46UcQrHkg7TcdM9vWI5VP82ZT98ShQKySwCkxfpo4rt9lf4IGXxGDzdKJQpA6rv
kVQwxC4M5wONR/cdPPZg7tRo7lMbWIUsZW+pbsjM0gjwmltf6AzJfwJRG8KZGNjL
H405KcnUGQkCNN4YPqK9gpW8JcOCT0h2LWMGhCKniNOVbIfPWaY1f+wj3WAnBd3R
vGUlu6y6AjgkTj7sDmzxFv/zp8Nkg3urQ5FCsSOC6R/1tVDnhpjsvlSn0kDjM6KX
2Xj4JjiAGXJBLI7gSJLHeH49fSjhEtYu7Yh0Tsg5C/2TUmlcM82xH9txAjhrxx6J
8dRTXzLj/bpHp/C6NnxnzZBIJu3ipja+9TzWoVEQppvFwdBvkiP0PGIDidC95rmN
AeeM5fVDAZ4edeKSQlnaSnW2tCRwT6bISMb54pX8DQqJMDXyTD+Qj3x9faVlmK5/
DzEMQGbn2QhF0HCjxexA
=8yoa
-----END PGP SIGNATURE-----
--=-=-=--

--===============0258273437==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============0258273437==--

From libssh2-devel-bounces@cool.haxx.se  Tue Sep  7 15:53:12 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o87Dr36Y029164;
	Tue, 7 Sep 2010 15:53:11 +0200
Received: from mail2.barcelona04.com (mx2.barcelona04.com [190.139.108.163])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o87Dr0l4029103
	for <libssh2-devel@cool.haxx.se>; Tue, 7 Sep 2010 15:53:01 +0200
X-Spam-Status: No, hits=0.0 required=4.0
	tests=AWL: -0.000,BAYES_00: -1.665,HTML_MESSAGE: 0.001,
	CUSTOM_RULE_FROM: ALLOW,TOTAL_SCORE: -1.664,autolearn=ham
X-Spam-Level: 
Received: from localhost ([127.0.0.1]) by mail2.barcelona04.com;
	Tue, 7 Sep 2010 10:50:49 -0300
Message-ID: <4C864279.4050801@barcelona04.com>
Date: Tue, 07 Sep 2010 10:47:37 -0300
From: Ezequiel Ruiz <eruiz@barcelona04.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; es-AR;
	rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2
MIME-Version: 1.0
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: keyboard-interactive method gives access violation in MSVC 2008
References: <SNT115-W1670983092213680554E2CDA8E0@phx.gbl>	<4C850DA2.3090709@barcelona04.com>	<AANLkTim_cmSKJnYNjkanP7L8sxCNYwkm+_z1xks9C+6o@mail.gmail.com>	<4C851697.1050606@barcelona04.com>	<AANLkTinPOj+kyK9tfKVeGTVe=e-BWM--c0YVvz8Tf3hr@mail.gmail.com>	<4C85212C.3040904@barcelona04.com>	<AANLkTinJoUOfVMbOFyR99z62oDU+LiT2q7bZiewmkRGq@mail.gmail.com>	<4C8533D3.1080707@barcelona04.com>	<87hbi2zp85.fsf@leibnitz.dottedmag.net>	<4C8548E6.2020200@barcelona04.com>	<AANLkTimdMsDLsGjGFrK-oMn33p1Pb9p=3t=0wsM=s2OP@mail.gmail.com>
	<87aanuyz1n.fsf@leibnitz.dottedmag.net>
In-Reply-To: <87aanuyz1n.fsf@leibnitz.dottedmag.net>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Tue, 07 Sep 2010 15:53:12 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Tue, 07 Sep 2010 15:53:01 +0200 (CEST)
Cc: Mikhail Gusarov <dottedmag@dottedmag.net>
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============1969349531=="
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

This is a multi-part message in MIME format.
--===============1969349531==
Content-Type: multipart/alternative;
 boundary="------------000606060305010203000405"

This is a multi-part message in MIME format.
--------------000606060305010203000405
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit

  Indeed. I've tested the code with Mingw (GCC 4.4) and it works OK.

El 07/09/2010 01:09 a.m., Mikhail Gusarov escribió:
> Twas brillig at 21:37:44 06.09.2010 UTC+01 when swish@lammy.co.uk did gyre and gimble:
>
>   AL>  This isn't an MSVC problem or even a Windows problem though it is
>   AL>  often reported that way.  It will happen with _any_ compiler on _any_
>   AL>  OS if two shared libraries are linked against different versions of
>   AL>  the C runtime and objects owned by one runtime are shared with the
>   AL>  other.
>
> If and only if C runtime implementation is stupid and does not handle
> this situation.
>
> MSVC one is.
>
>
>
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


--------------000606060305010203000405
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Indeed. I've tested the code with Mingw (GCC 4.4) and it works OK. <br>
    <br>
    El 07/09/2010 01:09 a.m., Mikhail Gusarov escribi&oacute;:
    <blockquote cite="mid:87aanuyz1n.fsf@leibnitz.dottedmag.net"
      type="cite">
      <pre wrap="">
Twas brillig at 21:37:44 06.09.2010 UTC+01 when <a class="moz-txt-link-abbreviated" href="mailto:swish@lammy.co.uk">swish@lammy.co.uk</a> did gyre and gimble:

 AL&gt; This isn't an MSVC problem or even a Windows problem though it is
 AL&gt; often reported that way.  It will happen with _any_ compiler on _any_
 AL&gt; OS if two shared libraries are linked against different versions of
 AL&gt; the C runtime and objects owned by one runtime are shared with the
 AL&gt; other.

If and only if C runtime implementation is stupid and does not handle
this situation.

MSVC one is.

</pre>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
libssh2-devel <a class="moz-txt-link-freetext" href="http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel">http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>

--------------000606060305010203000405--


--===============1969349531==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============1969349531==--

From libssh2-devel-bounces@cool.haxx.se  Tue Sep  7 16:05:22 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o87E5FoA008434;
	Tue, 7 Sep 2010 16:05:22 +0200
Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com
	[209.85.216.175])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o87E5DU2008404
	for <libssh2-devel@cool.haxx.se>; Tue, 7 Sep 2010 16:05:14 +0200
Received: by qyk31 with SMTP id 31so3683341qyk.20
	for <libssh2-devel@cool.haxx.se>; Tue, 07 Sep 2010 07:05:06 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=googlemail.com; s=gamma;
	h=domainkey-signature:mime-version:received:sender:received
	:in-reply-to:references:date:x-google-sender-auth:message-id:subject
	:from:to:content-type:content-transfer-encoding;
	bh=vuROwhBvxhkQy1xjcirhB24RKDkKR+8H8bLVcZl1/Go=;
	b=i5+MHGn2IgoIWooG4Fgi1+1v9zm9wYQ95koOuyMDODjBXdKUVLI4WTcutdCNYGqNPw
	ATuNXihIewTyQzzpn+i0/QMIphEcgewobmp245y5/bQ+YtgnouF24GtFVesQfrXUV31C
	EMvXKK5rejRt9an28nyZ9Okb3R0bRo9Sxxdgs=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type
	:content-transfer-encoding;
	b=HzTCRRV4K567FWeJ3xvK5Bkc684Bnibke1f9/W5s2hlQh3GuMPTUF0dRfb/YZBMEDN
	/kez3oXqOVFLblOrGK0KS820nV9mfSTrf+8V840N/JGUV02g/7iq3DRqyZHDojgGzECo
	mxP3F1ncwWy3UjY4B19jufeDsgo5HnUsdoosc=
MIME-Version: 1.0
Received: by 10.229.247.16 with SMTP id ma16mr63538qcb.90.1283868305972; Tue,
	07 Sep 2010 07:05:05 -0700 (PDT)
Received: by 10.229.73.68 with HTTP; Tue, 7 Sep 2010 07:05:05 -0700 (PDT)
In-Reply-To: <4C864279.4050801@barcelona04.com>
References: <SNT115-W1670983092213680554E2CDA8E0@phx.gbl>
	<4C850DA2.3090709@barcelona04.com>
	<AANLkTim_cmSKJnYNjkanP7L8sxCNYwkm+_z1xks9C+6o@mail.gmail.com>
	<4C851697.1050606@barcelona04.com>
	<AANLkTinPOj+kyK9tfKVeGTVe=e-BWM--c0YVvz8Tf3hr@mail.gmail.com>
	<4C85212C.3040904@barcelona04.com>
	<AANLkTinJoUOfVMbOFyR99z62oDU+LiT2q7bZiewmkRGq@mail.gmail.com>
	<4C8533D3.1080707@barcelona04.com>
	<87hbi2zp85.fsf@leibnitz.dottedmag.net>
	<4C8548E6.2020200@barcelona04.com>
	<AANLkTimdMsDLsGjGFrK-oMn33p1Pb9p=3t=0wsM=s2OP@mail.gmail.com>
	<87aanuyz1n.fsf@leibnitz.dottedmag.net>
	<4C864279.4050801@barcelona04.com>
Date: Tue, 7 Sep 2010 15:05:05 +0100
X-Google-Sender-Auth: vFbyMsuIJk2S-ZJqCBovxak0jEo
Message-ID: <AANLkTi=v_KYiTFf7jVRj9eJ=qNyS=1qUD_WhC0mBNsR8@mail.gmail.com>
Subject: Re: keyboard-interactive method gives access violation in MSVC 2008
From: Alexander Lamaison <swish@lammy.co.uk>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Tue, 07 Sep 2010 16:05:22 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Tue, 07 Sep 2010 16:05:14 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

> El 07/09/2010 01:09 a.m., Mikhail Gusarov escribi=F3:
>
> Twas brillig at 21:37:44 06.09.2010 UTC+01 when swish@lammy.co.uk did gyre
> and gimble:
>
>  AL> This isn't an MSVC problem or even a Windows problem though it is
>  AL> often reported that way.  It will happen with _any_ compiler on _any_
>  AL> OS if two shared libraries are linked against different versions of
>  AL> the C runtime and objects owned by one runtime are shared with the
>  AL> other.
>
> If and only if C runtime implementation is stupid and does not handle
> this situation.
>
> MSVC one is.

On 7 September 2010 14:47, Ezequiel Ruiz <eruiz@barcelona04.com> wrote:
> Indeed. I've tested the code with Mingw (GCC 4.4) and it works OK.

This will be because Mingw doesn't give you the option of linking to
different runtime versions (such as Debug variants), not because MSVC
is 'broken' and Mingw is not.  Your code will still be violating the
rules and works by luck.

Alex

--
Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Tue Sep  7 16:23:57 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o87ENpvp024808;
	Tue, 7 Sep 2010 16:23:56 +0200
Received: from mail2.barcelona04.com (mx2.barcelona04.com [190.139.108.163])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o87ENmS9024790
	for <libssh2-devel@cool.haxx.se>; Tue, 7 Sep 2010 16:23:49 +0200
X-Spam-Status: No, hits=0.0 required=4.0
	tests=AWL: 0.000,BAYES_00: -1.665,CUSTOM_RULE_FROM: ALLOW,
	TOTAL_SCORE: -1.665,autolearn=ham
X-Spam-Level: 
Received: from localhost ([127.0.0.1]) by mail2.barcelona04.com;
	Tue, 7 Sep 2010 11:16:21 -0300
Message-ID: <4C864878.40507@barcelona04.com>
Date: Tue, 07 Sep 2010 11:13:12 -0300
From: Ezequiel Ruiz <eruiz@barcelona04.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; es-AR;
	rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2
MIME-Version: 1.0
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: keyboard-interactive method gives access violation in MSVC 2008
References: <SNT115-W1670983092213680554E2CDA8E0@phx.gbl>	<4C850DA2.3090709@barcelona04.com>	<AANLkTim_cmSKJnYNjkanP7L8sxCNYwkm+_z1xks9C+6o@mail.gmail.com>	<4C851697.1050606@barcelona04.com>	<AANLkTinPOj+kyK9tfKVeGTVe=e-BWM--c0YVvz8Tf3hr@mail.gmail.com>	<4C85212C.3040904@barcelona04.com>	<AANLkTinJoUOfVMbOFyR99z62oDU+LiT2q7bZiewmkRGq@mail.gmail.com>	<4C8533D3.1080707@barcelona04.com>	<87hbi2zp85.fsf@leibnitz.dottedmag.net>	<4C8548E6.2020200@barcelona04.com>	<AANLkTimdMsDLsGjGFrK-oMn33p1Pb9p=3t=0wsM=s2OP@mail.gmail.com>	<87aanuyz1n.fsf@leibnitz.dottedmag.net>	<4C864279.4050801@barcelona04.com>
	<AANLkTi=v_KYiTFf7jVRj9eJ=qNyS=1qUD_WhC0mBNsR8@mail.gmail.com>
In-Reply-To: <AANLkTi=v_KYiTFf7jVRj9eJ=qNyS=1qUD_WhC0mBNsR8@mail.gmail.com>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Tue, 07 Sep 2010 16:23:57 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Tue, 07 Sep 2010 16:23:49 +0200 (CEST)
Cc: Alexander Lamaison <swish@lammy.co.uk>
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="iso-8859-1"; Format="flowed"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

  Ok, that makes sense. So, in my case, what do you think I have to =

change in order to follow the rules?
I mean, I'm using a DLL release of libssh, and storing my wrapper into =

another DLL (which uses a lot of other libraries like pcre, boost, =

etc...). If the callback function of libssh2 asks to allocate memory for =

that variable in MY dll, and then deallocates that memory in libssh2's =

DLL. What options do I have? (apart of defining my own memory allocator).

Ezequiel

El 07/09/2010 11:05 a.m., Alexander Lamaison escribi=F3:
>> El 07/09/2010 01:09 a.m., Mikhail Gusarov escribi=F3:
>>
>> Twas brillig at 21:37:44 06.09.2010 UTC+01 when swish@lammy.co.uk did gy=
re
>> and gimble:
>>
>>   AL>  This isn't an MSVC problem or even a Windows problem though it is
>>   AL>  often reported that way.  It will happen with _any_ compiler on _=
any_
>>   AL>  OS if two shared libraries are linked against different versions =
of
>>   AL>  the C runtime and objects owned by one runtime are shared with the
>>   AL>  other.
>>
>> If and only if C runtime implementation is stupid and does not handle
>> this situation.
>>
>> MSVC one is.
> On 7 September 2010 14:47, Ezequiel Ruiz<eruiz@barcelona04.com>  wrote:
>> Indeed. I've tested the code with Mingw (GCC 4.4) and it works OK.
> This will be because Mingw doesn't give you the option of linking to
> different runtime versions (such as Debug variants), not because MSVC
> is 'broken' and Mingw is not.  Your code will still be violating the
> rules and works by luck.
>
> Alex
>
> --
> Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


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

From libssh2-devel-bounces@cool.haxx.se  Tue Sep  7 23:03:08 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o87L2Mno009883;
	Tue, 7 Sep 2010 23:03:03 +0200
Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com
	[209.85.215.182])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o87L2JKi009820
	for <libssh2-devel@cool.haxx.se>; Tue, 7 Sep 2010 23:02:20 +0200
Received: by eyx24 with SMTP id 24so3507975eyx.41
	for <libssh2-devel@cool.haxx.se>; Tue, 07 Sep 2010 14:02:16 -0700 (PDT)
Received: by 10.213.9.82 with SMTP id k18mr195524ebk.92.1283893336249;
	Tue, 07 Sep 2010 14:02:16 -0700 (PDT)
Received: from [192.168.0.35] (96-160.ftth.onsbrabantnet.nl [88.159.160.96])
	by mx.google.com with ESMTPS id z55sm10567666eeh.21.2010.09.07.14.02.13
	(version=SSLv3 cipher=RC4-MD5); Tue, 07 Sep 2010 14:02:14 -0700 (PDT)
Message-ID: <4C86A84D.3090403@peut.org>
Date: Tue, 07 Sep 2010 23:02:05 +0200
From: Jose Baars <peut@peut.org>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; nl;
	rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2
MIME-Version: 1.0
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: keyboard-interactive method gives access violation in MSVC 2008
References: <SNT115-W1670983092213680554E2CDA8E0@phx.gbl>	<4C850DA2.3090709@barcelona04.com>	<AANLkTim_cmSKJnYNjkanP7L8sxCNYwkm+_z1xks9C+6o@mail.gmail.com>	<4C851697.1050606@barcelona04.com>	<AANLkTinPOj+kyK9tfKVeGTVe=e-BWM--c0YVvz8Tf3hr@mail.gmail.com>	<4C85212C.3040904@barcelona04.com>	<AANLkTinJoUOfVMbOFyR99z62oDU+LiT2q7bZiewmkRGq@mail.gmail.com>	<4C8533D3.1080707@barcelona04.com>	<87hbi2zp85.fsf@leibnitz.dottedmag.net>	<4C8548E6.2020200@barcelona04.com>	<AANLkTimdMsDLsGjGFrK-oMn33p1Pb9p=3t=0wsM=s2OP@mail.gmail.com>	<87aanuyz1n.fsf@leibnitz.dottedmag.net>	<4C864279.4050801@barcelona04.com>	<AANLkTi=v_KYiTFf7jVRj9eJ=qNyS=1qUD_WhC0mBNsR8@mail.gmail.com>
	<4C864878.40507@barcelona04.com>
In-Reply-To: <4C864878.40507@barcelona04.com>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Tue, 07 Sep 2010 23:03:07 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Tue, 07 Sep 2010 23:02:20 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0108576754=="
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

This is a cryptographically signed message in MIME format.

--===============0108576754==
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha1; boundary="------------ms090802090805040107040702"

This is a cryptographically signed message in MIME format.

--------------ms090802090805040107040702
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: quoted-printable

  Op 9/7/2010 4:13 PM, Ezequiel Ruiz schreef:
>>
>>> Indeed. I've tested the code with Mingw (GCC 4.4) and it works OK.
>> This will be because Mingw doesn't give you the option of linking to
>> different runtime versions (such as Debug variants), not because MSVC
>> is 'broken' and Mingw is not.  Your code will still be violating the
>> rules and works by luck.
>>
>> Alex
>
Can someone provide a url where these rules are roughly explained?

I find this all very interesting, but I work on systems where my 15 year =
old
programs happily keep running after 6 operating system upgrades. For
me it is very disturbing  to read, possibly because I don't understand=20
what's
going on here.

TIA,
Jose



--------------ms090802090805040107040702
Content-Type: application/pkcs7-signature; name="smime.p7s"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="smime.p7s"
Content-Description: S/MIME Cryptographic Signature

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIO1DCC
BEYwggOvoAMCAQICEGb9R+PCGeToms2Z3fU6yyQwDQYJKoZIhvcNAQEFBQAwXzELMAkGA1UE
BhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAxIFB1Ymxp
YyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTA1MTAyODAwMDAwMFoXDTE1
MTAyNzIzNTk1OVowgd0xCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEf
MB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29yazE7MDkGA1UECxMyVGVybXMgb2YgdXNl
IGF0IGh0dHBzOi8vd3d3LnZlcmlzaWduLmNvbS9ycGEgKGMpMDUxHjAcBgNVBAsTFVB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myf78J+6YTh2Jb/WQWPjc0rBkGwlPiUvICSCj/tiNHOUc/AAAAAAAA
--------------ms090802090805040107040702--

--===============0108576754==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============0108576754==--

From libssh2-devel-bounces@cool.haxx.se  Wed Sep  8 01:03:31 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o87N3C2E013658;
	Wed, 8 Sep 2010 01:03:28 +0200
Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com
	[209.85.216.175])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o87N3BfE013520
	for <libssh2-devel@cool.haxx.se>; Wed, 8 Sep 2010 01:03:11 +0200
Received: by qyk31 with SMTP id 31so4279416qyk.20
	for <libssh2-devel@cool.haxx.se>; Tue, 07 Sep 2010 16:03:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
	d=googlemail.com; s=gamma;
	h=domainkey-signature:mime-version:received:sender:received
	:in-reply-to:references:date:x-google-sender-auth:message-id:subject
	:from:to:content-type:content-transfer-encoding;
	bh=KGcaekPziQEEGO2VlCbU4rgwJum7u+x7DEm7pT8TjIw=;
	b=VjyTni6Bk0BSdEOsfeYXFeiq2QK5G5IXIS8BmLnwiV3aDP2Sp7gtQ/ZPUq+u8uVshY
	BbzBT97GsfZQ/itshYF2PCrYgpjoZJ2Zw2pE6p/yrjzOQ7Mw47mgWqGChwI0eYsTxcmh
	7X96EqKxCZfQpFpu82L9eGrBojCA2zyI06omE=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma;
	h=mime-version:sender:in-reply-to:references:date
	:x-google-sender-auth:message-id:subject:from:to:content-type
	:content-transfer-encoding;
	b=gPnocnsfN5EMCGnPsoyD5OZN3SbA06zZtFOAzMAJsrptbCRwiqw3jzgaK1dK7TqWeS
	ULHDNZBrY76RWkpeGlOwz/q+uBODOa4moU1FPrSuSuPg/IIyYIbQp485TjvYn4UCyWBG
	Mkfcetwo5Ed8UA5MIu1e54mlbMlWDcYRP3L3c=
MIME-Version: 1.0
Received: by 10.224.20.9 with SMTP id d9mr296548qab.364.1283900582073; Tue, 07
	Sep 2010 16:03:02 -0700 (PDT)
Received: by 10.229.73.68 with HTTP; Tue, 7 Sep 2010 16:03:01 -0700 (PDT)
In-Reply-To: <4C86A84D.3090403@peut.org>
References: <SNT115-W1670983092213680554E2CDA8E0@phx.gbl>
	<4C850DA2.3090709@barcelona04.com>
	<AANLkTim_cmSKJnYNjkanP7L8sxCNYwkm+_z1xks9C+6o@mail.gmail.com>
	<4C851697.1050606@barcelona04.com>
	<AANLkTinPOj+kyK9tfKVeGTVe=e-BWM--c0YVvz8Tf3hr@mail.gmail.com>
	<4C85212C.3040904@barcelona04.com>
	<AANLkTinJoUOfVMbOFyR99z62oDU+LiT2q7bZiewmkRGq@mail.gmail.com>
	<4C8533D3.1080707@barcelona04.com>
	<87hbi2zp85.fsf@leibnitz.dottedmag.net>
	<4C8548E6.2020200@barcelona04.com>
	<AANLkTimdMsDLsGjGFrK-oMn33p1Pb9p=3t=0wsM=s2OP@mail.gmail.com>
	<87aanuyz1n.fsf@leibnitz.dottedmag.net>
	<4C864279.4050801@barcelona04.com>
	<AANLkTi=v_KYiTFf7jVRj9eJ=qNyS=1qUD_WhC0mBNsR8@mail.gmail.com>
	<4C864878.40507@barcelona04.com> <4C86A84D.3090403@peut.org>
Date: Wed, 8 Sep 2010 00:03:01 +0100
X-Google-Sender-Auth: NTyYIqR_119ZoX93wOEYBY84NmE
Message-ID: <AANLkTikVChtTBmbfSSZ4NC2aYdO0owHda5=ujpL7fzrm@mail.gmail.com>
Subject: Re: keyboard-interactive method gives access violation in MSVC 2008
From: Alexander Lamaison <swish@lammy.co.uk>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Wed, 08 Sep 2010 01:03:31 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Wed, 08 Sep 2010 01:03:12 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

On 7 September 2010 22:02, Jose Baars <peut@peut.org> wrote:
> =A0Op 9/7/2010 4:13 PM, Ezequiel Ruiz schreef:
>>>
>>>> Indeed. I've tested the code with Mingw (GCC 4.4) and it works OK.
>>>
>>> This will be because Mingw doesn't give you the option of linking to
>>> different runtime versions (such as Debug variants), not because MSVC
>>> is 'broken' and Mingw is not. =A0Your code will still be violating the
>>> rules and works by luck.
>>>
>>> Alex
>>
> Can someone provide a url where these rules are roughly explained?
...snip
> Jose

Hmmm.  The first rule, "always deallocate memory with the same
allocator that allocated it" is as old a houses and probably isn't
written anywhere formal.  For instance, you would never dream of using
`malloc` to allocate and `delete` to deallocate  .However it follows
from the basic rule that if you want to access some data stored in one
location in memory, accessing a completely different location in
memory isn't going to get you the data you were after!  The data in
this case being the allocator's table of allocated regions.

The second 'rule' is in fact the absence of a rule: the rule that
different implementations of the C runtime must store their data in a
common location and manipulate it in a common way.  There is no such
rule in the C specification and therefore you can't rely on in.  In
fact, as has been shown here often, real implementations _don't_ share
their data and any cross-module manipulation leads to memory
corruption.

See also:
 - http://blogs.msdn.com/b/oldnewthing/archive/2006/09/15/755966.aspx
 - http://msdn.microsoft.com/en-us/library/ms235460%28VS.80%29.aspx

Alex

--
Swish - Easy SFTP for Windows Explorer (http://www.swish-sftp.org)
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Wed Sep  8 15:31:31 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o88DV4NU001017;
	Wed, 8 Sep 2010 15:31:26 +0200
Received: from mail-qy0-f182.google.com (mail-qy0-f182.google.com
	[209.85.216.182])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o88DV1bQ000919
	for <libssh2-devel@cool.haxx.se>; Wed, 8 Sep 2010 15:31:02 +0200
Received: by qyk4 with SMTP id 4so39162qyk.20
	for <libssh2-devel@cool.haxx.se>; Wed, 08 Sep 2010 06:30:53 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.229.224.67 with SMTP id in3mr1164192qcb.91.1283952652811; Wed,
	08 Sep 2010 06:30:52 -0700 (PDT)
Received: by 10.229.43.7 with HTTP; Wed, 8 Sep 2010 06:30:47 -0700 (PDT)
In-Reply-To: <AANLkTikVChtTBmbfSSZ4NC2aYdO0owHda5=ujpL7fzrm@mail.gmail.com>
References: <SNT115-W1670983092213680554E2CDA8E0@phx.gbl>
	<4C850DA2.3090709@barcelona04.com>
	<AANLkTim_cmSKJnYNjkanP7L8sxCNYwkm+_z1xks9C+6o@mail.gmail.com>
	<4C851697.1050606@barcelona04.com>
	<AANLkTinPOj+kyK9tfKVeGTVe=e-BWM--c0YVvz8Tf3hr@mail.gmail.com>
	<4C85212C.3040904@barcelona04.com>
	<AANLkTinJoUOfVMbOFyR99z62oDU+LiT2q7bZiewmkRGq@mail.gmail.com>
	<4C8533D3.1080707@barcelona04.com>
	<87hbi2zp85.fsf@leibnitz.dottedmag.net>
	<4C8548E6.2020200@barcelona04.com>
	<AANLkTimdMsDLsGjGFrK-oMn33p1Pb9p=3t=0wsM=s2OP@mail.gmail.com>
	<87aanuyz1n.fsf@leibnitz.dottedmag.net>
	<4C864279.4050801@barcelona04.com>
	<AANLkTi=v_KYiTFf7jVRj9eJ=qNyS=1qUD_WhC0mBNsR8@mail.gmail.com>
	<4C864878.40507@barcelona04.com> <4C86A84D.3090403@peut.org>
	<AANLkTikVChtTBmbfSSZ4NC2aYdO0owHda5=ujpL7fzrm@mail.gmail.com>
Date: Wed, 8 Sep 2010 15:30:47 +0200
Message-ID: <AANLkTinJqEUWhvVaZUcswu+Vybc_ecRPvYhgOKmeSqvy@mail.gmail.com>
Subject: Re: keyboard-interactive method gives access violation in MSVC 2008
From: Jose Baars <peut@peut.org>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Wed, 08 Sep 2010 15:31:31 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Wed, 08 Sep 2010 15:31:02 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0509438239=="
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

--===============0509438239==
Content-Type: multipart/alternative; boundary=0016363b9250c7831c048fbf853b

--0016363b9250c7831c048fbf853b
Content-Type: text/plain; charset=ISO-8859-1

Thanks, it makes sense now: Don't rely on CRTL functions or structures like
malloc/free or fopen/fclose or FILE to be compatible across CRTL versions
unless you know
all versions that would ever be used are guaranteed to be compatible, and
don't assume implicitly global values (like environment variables on
Windows) to be actually global across DLL's.
I would think using delete for a malloc'ed buffer would fall under the rule:
Apart from oversights, don't make stupid mistakes as well.

--0016363b9250c7831c048fbf853b
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Thanks, it makes sense now: Don&#39;t rely on CRTL functions or structures =
like<br>malloc/free or fopen/fclose or FILE to be compatible across CRTL ve=
rsions unless you know<br>all versions that would ever be used are guarante=
ed to be compatible, and don&#39;t assume implicitly global values (like en=
vironment variables on Windows) to be actually global across DLL&#39;s.<br>
I would think using delete for a malloc&#39;ed buffer would fall under the =
rule: Apart from oversights, don&#39;t make stupid mistakes as well.<br><br=
><br>

--0016363b9250c7831c048fbf853b--

--===============0509438239==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============0509438239==--

From libssh2-devel-bounces@cool.haxx.se  Wed Sep  8 19:46:48 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o88HkMVn022855;
	Wed, 8 Sep 2010 19:46:44 +0200
Received: from earth.stuge.se (earth.stuge.se [213.88.146.15])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o88HkL95022852
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Wed, 8 Sep 2010 19:46:21 +0200
Received: (qmail 24500 invoked from network); 8 Sep 2010 17:46:15 -0000
Received: from unknown (HELO earth.stuge.se) (127.0.0.1)
	by localhost with SMTP; 8 Sep 2010 17:46:15 -0000
MIME-Version: 1.0
From: "libssh2 Trac" <trac@libssh2.stuge.se>
X-Trac-Version: 0.12b1
Precedence: bulk
Cc: libssh2-devel@cool.haxx.se
Auto-Submitted: auto-generated
X-Mailer: Trac 0.12b1, by Edgewall Software
X-Trac-Project: libssh2
Date: Wed, 08 Sep 2010 17:46:15 -0000
X-URL: http://trac.libssh2.org/
Subject: [libssh2] #185: libssh2_sftp_write still returns wrong value
X-Trac-Ticket-URL: http://trac.libssh2.org/ticket/185
Message-ID: <042.88a5561560f4ceff783b6539731a5d1c@libssh2.stuge.se>
X-Trac-Ticket-ID: 185
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Wed, 08 Sep 2010 19:46:48 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Wed, 08 Sep 2010 19:46:21 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Reply-To: trac@libssh2.stuge.se,
        libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

#185: libssh2_sftp_write still returns wrong value
--------------------+-------------------------------------------------------
 Reporter:  mstrsn  |       Owner:       
     Type:  defect  |      Status:  new  
 Priority:  normal  |   Milestone:  1.2.7
Component:  SFTP    |     Version:  1.2.7
 Keywords:          |      Blocks:       
Blocked By:          |  
--------------------+-------------------------------------------------------
 This is related to bug #158 which I submitted against 1.2.4 back in April.
 I believe the changes made to close that bug were insufficient. When
 _libssh2_channel_write() fails because there is no room in local storage
 (i.e. channel->local.window_size is 0), I believe it should be treated as
 a blocking situation and _libssh2_channel_write should return
 LIBSSH2_ERROR_EAGAIN. Currently, it returns 0 which libssh2_sftp_write
 interprets as an error. This patch fixes the problem for my SFTP client
 application:

 %diff -u channel.c.orig channel.c
 --- channel.c.orig      Wed Sep  8 13:30:57 2010
 +++ channel.c   Wed Sep  8 13:24:20 2010
 @@ -1958,6 +1958,7 @@
      /* Deduct the amount that has already been sent, and set buf
 accordingly. */
      buflen -= channel->write_bufwrote;
      buf += channel->write_bufwrote;
 +    wrote = channel->write_bufwrote;

      while (buflen > 0) {
          if (channel->write_state == libssh2_NB_state_allocated) {
 @@ -1969,7 +1970,8 @@

              if(channel->local.window_size <= 0) {
                  /* there's no more room for data so we stop sending now
 */
 -                break;
 +                /* and tell the caller to try again later */
 +                return LIBSSH2_ERROR_EAGAIN;
              }

              channel->write_bufwrite = buflen;

-- 
Ticket URL: <http://trac.libssh2.org/ticket/185>
libssh2 <http://trac.libssh2.org/>
C library for writing portable SSH2 clients
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Thu Sep  9 03:31:26 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o891UkAR022215;
	Thu, 9 Sep 2010 03:31:22 +0200
Received: from shell.lmi.net (shell.lmi.net [66.117.140.246])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o891UfMD022187
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Thu, 9 Sep 2010 03:30:43 +0200
Received: from rcom-software.com (75-101-82-95.dsl2st.lmi.net [75.101.82.95])
	by shell.lmi.net (8.14.1/8.14.1) with ESMTP id o891USvs037014
	for <libssh2-devel@cool.haxx.se>; Wed, 8 Sep 2010 18:30:29 -0700 (PDT)
Message-ID: <4C8838C2.16C11BA8@rcom-software.com>
Date: Wed, 08 Sep 2010 18:30:42 -0700
From: Paul Romero <paulr@rcom-software.com>
Organization: RCOM Communications Software
X-Mailer: Mozilla 4.77 [en] (Win95; U)
X-Accept-Language: en,es,de-DE,fr-FR
MIME-Version: 1.0
To: libssh2-devel@cool.haxx.se
Subject: Libssh2: Memory Allocation Failure
Content-Type: multipart/mixed; boundary="------------9AA83D318B1A113595DD8853"
X-Scanned-By: MIMEDefang 2.37
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Thu, 09 Sep 2010 03:31:26 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Thu, 09 Sep 2010 03:30:44 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

This is a multi-part message in MIME format.
--------------9AA83D318B1A113595DD8853
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

Dear User Group:

After running the test program attached to this message
for several hours under uCLinux on a Coldfire 5249 CPU
the following memory allocation described below occurred.
The system I ran the test on certainly has at least
2 MB spare memory and I don't understand the reason.

The dump produced by Libssh2 follows this message.
Is anybody interested in this problem or do you
have an idea about the cause ?


Best Regards,


Paul R.

**************** Libssh2 Dump *********************


sftp_start_negotiate: SSH Session Initialized
sftp_negotiate: SSH Session Started
__alloc_pages: 0-order allocation failed (gfp=3D0x1f0/0)
Allocation of length 264 from process 18 failed
Buffer memory:       12kB
Cache memory:     2036kB
Free pages:         108kB (     0kB HighMem)
Zone:DMA freepages:     0kB
Zone:Normal freepages:   108kB
Zone:HighMem freepages:     0kB
( Active: 85, inactive: 427, free: 27 )
=3D 0kB)
1*4kB 3*8kB 1*16kB 0*32kB 1*64kB 0*128kB 0*256kB 0*512kB 0*1024kB
0*2048kB =3D 108
kB)
=3D 0kB)

camtaul ier[ro1r:8 C]an nokt ialllolcaeted m emborey
 ause of sig - 6
STACK DUMP:
0x0073778c: 0073783c 00008056 007377a4 0025d8b2 00000012 00000006
007378bc
0x007377a8: 0025afea 00000006 00000000 00737800 00252fd6 00000040
00000000
0x007377c4: 00000000 00000000 00000000 00000000 00000000 00000000
00000000
0x007377e0: 00000000 00000000 00000000 00000000 00000000 00000000
00000000
0x007377fc: 00000000 0073784c 00252fd6 00000080 00000000 00000000
00000000
0x00737818: 00000000 00000000 00000000 00000000 00000000 40740000
0025a344
0x00737834: 00737890 0025a656 00000020 00000000 00000000 00000000
00000000
0x00737850: 00000000 00000000 00000000 00000000 00000000 00000000
00000000
0x0073786c: 00000000 00000000 00000000 00000000 00000000 00000000
00000000
0x00737888: 00000000 00000000 00000000 00000000 00000000 00000000
00000000

Format 04  Vector: 0080  PC: 0025daaa  Status: 0000    Not tainted
ORIG_D0: 00000025  D0: 00000000  A2: 0073363c  A1: 000001e4
A0: 00000012  D5: 00000020  D4: 00000020
D3: 00008056  D2: 00000006  D1: 00000012
USP: 0073778c

* Sash: EXIT Child =3D 18 Sig =3D 1 Status =3D 6
/> =FC


--
Paul Romero

RCOM Communications Software

Phone/Fax: (510)339-2628
E-Mail: paulr@rcom-software.com


--------------9AA83D318B1A113595DD8853
Content-Type: application/x-unknown-content-type-cfile;
 name="sftp_test.c"
Content-Transfer-Encoding: base64
Content-Disposition: inline;
 filename="sftp_test.c"

LyoNCiAqIFNDX1ZFUlNJT046IDAuMC4xDQogKi8NCg0KI2luY2x1ZGUgPHN0ZGlvLmg+DQoj
aW5jbHVkZSA8c3RkbGliLmg+DQojaW5jbHVkZSA8c3RyaW5nLmg+DQojaW5jbHVkZSA8Y3R5
cGUuaD4NCg0KI2luY2x1ZGUgPGxpbnV4L2xpbWl0cy5oPg0KI2luY2x1ZGUgPGVycm5vLmg+
DQoNCiNpbmNsdWRlIDxzaWduYWwuaD4NCg0KI2luY2x1ZGUgPHRlcm1pb3MuaD4NCiNpbmNs
dWRlIDxwb2xsLmg+DQoNCiNpbmNsdWRlIDxuZXRkYi5oPg0KDQojaW5jbHVkZSA8bGlic3No
Ml9jb25maWcuaD4NCiNpbmN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JICovDQoJaWYocGlkID4gMCkNCgkgIHsNCgkJZnByaW50ZihzdGRlcnIsICJz
dGFydF9wcHA6IFBQUCBTdGFydGluZyBFeGVjdXRpb25cbiIpOw0KCQlydmFsID0gVFJVRTsN
CgkgIH0NCgllbHNlDQoJICB7DQoJCXJ2YWwgPSBGQUxTRTsNCgkgIH0NCg0KCWZwcmludGYo
c3RkZXJyLCAic3RhcnRfcHBwOiBGT1JLIERPTkUgJWRcbiIsIHJ2YWwpOw0KCXJldHVybihy
dmFsKTsNCn0NCg==
--------------9AA83D318B1A113595DD8853
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--------------9AA83D318B1A113595DD8853--

From libssh2-devel-bounces@cool.haxx.se  Thu Sep  9 04:30:42 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8925me2000461;
	Thu, 9 Sep 2010 04:05:59 +0200
Received: from mail.ritual.org (146.n01.hh.clusters.de [213.238.52.146])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8925jNO000325
	for <libssh2-devel@cool.haxx.se>; Thu, 9 Sep 2010 04:05:46 +0200
Received: from spring.local (spring.ritual.org [217.91.25.149])
	(authenticated bits=0)
	by mail.ritual.org (8.12.9/8.12.9) with ESMTP id o8925hUF012283
	for <libssh2-devel@cool.haxx.se>; Thu, 9 Sep 2010 04:05:43 +0200
Received: from [IPv6:::1] (localhost [IPv6:::1])
	by spring.local (Postfix) with ESMTP id C2C98321AAA5
	for <libssh2-devel@cool.haxx.se>; Thu,  9 Sep 2010 04:05:42 +0200 (CEST)
From: Uli Zappe <uli@ritual.org>
Subject: libssh2_scp_send64: incorrect/unspecific error message
Date: Thu, 9 Sep 2010 04:05:42 +0200
Message-Id: <865A2E79-C252-4D0A-BC60-9F95E53BBCF6@spring.local>
To: libssh2 development <libssh2-devel@cool.haxx.se>
Mime-Version: 1.0 (Apple Message framework v1081)
X-Mailer: Apple Mail (2.1081)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Thu, 09 Sep 2010 04:06:00 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Thu, 09 Sep 2010 04:05:46 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Hi,

when you call libssh2_scp_send64 (or libssh2_scp_send, for that matter) wit=
h a destination path that does not exist (i.e. the directory path component=
 does not exist), the error you get is

   failed waiting for ACK

While this is not strictly wrong, it's rather unspecific and not very helpf=
ul for an end user.

OpenSSH's scp returns

   No such file or directory

in this situation (same sshd on the other end) which is what you would expe=
ct.

Is this a bug, a missing feature or intended behavior for libssh2_scp_send6=
4?

            Bye
                    Uli
________________________________________________________

  Uli Zappe, Solmsstra=DFe 5, D-65189 Wiesbaden, Germany
  http://www.ritual.org
  Fon: +49-700-ULIZAPPE
  Fax: +49-700-ZAPPEFAX
________________________________________________________

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

From libssh2-devel-bounces@cool.haxx.se  Thu Sep  9 05:38:04 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o893bleO004545;
	Thu, 9 Sep 2010 05:38:01 +0200
Received: from mail.ritual.org (146.n01.hh.clusters.de [213.238.52.146])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o893bjQ3004350
	for <libssh2-devel@cool.haxx.se>; Thu, 9 Sep 2010 05:37:45 +0200
Received: from spring.local (spring.ritual.org [217.91.25.149])
	(authenticated bits=0)
	by mail.ritual.org (8.12.9/8.12.9) with ESMTP id o893biUF012740
	for <libssh2-devel@cool.haxx.se>; Thu, 9 Sep 2010 05:37:44 +0200
Received: from [IPv6:::1] (localhost [IPv6:::1])
	by spring.local (Postfix) with ESMTP id 5B804321B389
	for <libssh2-devel@cool.haxx.se>; Thu,  9 Sep 2010 05:37:44 +0200 (CEST)
Mime-Version: 1.0 (Apple Message framework v1081)
Subject: Re: libssh2_scp_send64: incorrect/unspecific error message
From: Uli Zappe <uli@ritual.org>
In-Reply-To: <865A2E79-C252-4D0A-BC60-9F95E53BBCF6@spring.local>
Date: Thu, 9 Sep 2010 05:37:44 +0200
Message-Id: <ACB50331-63F2-49D1-828A-42A2D6080123@spring.local>
References: <865A2E79-C252-4D0A-BC60-9F95E53BBCF6@spring.local>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Mailer: Apple Mail (2.1081)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Thu, 09 Sep 2010 05:38:04 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Thu, 09 Sep 2010 05:37:45 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Additionally (and somewhat unrelated), specifying mtime and atime in libssh=
2_scp_send64 does not have any effect at all on my systems.

The docs say libssh2_scp_send64 was just recently added. Is it still in bet=
a or should it work 100% correctly?

            Bye
                    Uli
________________________________________________________

  Uli Zappe, Solmsstra=DFe 5, D-65189 Wiesbaden, Germany
  http://www.ritual.org
  Fon: +49-700-ULIZAPPE
  Fax: +49-700-ZAPPEFAX
________________________________________________________

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

From libssh2-devel-bounces@cool.haxx.se  Thu Sep  9 19:12:05 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o89HBfE4031433;
	Thu, 9 Sep 2010 19:12:01 +0200
Received: from giant.haxx.se (giant.haxx.se [80.67.6.50])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o89HBdtj031427
	for <libssh2-devel@cool.haxx.se>; Thu, 9 Sep 2010 19:11:39 +0200
Date: Thu, 9 Sep 2010 19:11:39 +0200 (CEST)
From: Daniel Stenberg <daniel@haxx.se>
X-X-Sender: dast@giant.haxx.se
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: libssh2_scp_send64: incorrect/unspecific error message
In-Reply-To: <ACB50331-63F2-49D1-828A-42A2D6080123@spring.local>
Message-ID: <alpine.DEB.2.00.1009091910420.24402@tvnag.unkk.fr>
References: <865A2E79-C252-4D0A-BC60-9F95E53BBCF6@spring.local>
	<ACB50331-63F2-49D1-828A-42A2D6080123@spring.local>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
X-fromdanielhimself: yes
MIME-Version: 1.0
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Thu, 09 Sep 2010 19:12:05 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Thu, 09 Sep 2010 19:11:39 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

On Thu, 9 Sep 2010, Uli Zappe wrote:

> Additionally (and somewhat unrelated), specifying mtime and atime in 
> libssh2_scp_send64 does not have any effect at all on my systems.

Have you checked the code and seen if that data is passed on as supposed?

> The docs say libssh2_scp_send64 was just recently added. Is it still in beta 
> or should it work 100% correctly?

It works basically exactly like libssh2_scp_send(), except that it supports 
large files which the older libssh2_scp_send() API doesn't.

-- 

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

From libssh2-devel-bounces@cool.haxx.se  Thu Sep  9 23:42:38 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o89LgJHp007135;
	Thu, 9 Sep 2010 23:42:33 +0200
Received: from giant.haxx.se (giant.haxx.se [80.67.6.50])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o89LgIl9007124
	for <libssh2-devel@cool.haxx.se>; Thu, 9 Sep 2010 23:42:18 +0200
Date: Thu, 9 Sep 2010 23:42:18 +0200 (CEST)
From: Daniel Stenberg <daniel@haxx.se>
X-X-Sender: dast@giant.haxx.se
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: Libssh2: Memory Allocation Failure
In-Reply-To: <4C8838C2.16C11BA8@rcom-software.com>
Message-ID: <alpine.DEB.2.00.1009092340470.24402@tvnag.unkk.fr>
References: <4C8838C2.16C11BA8@rcom-software.com>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
X-fromdanielhimself: yes
MIME-Version: 1.0
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Thu, 09 Sep 2010 23:42:38 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Thu, 09 Sep 2010 23:42:18 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

On Wed, 8 Sep 2010, Paul Romero wrote:

> Is anybody interested in this problem

Yes, I am.

> or do you have an idea about the cause ?

No...

Did you try running it on a x86 linux for a while using valgrind to see if it 
triggers anything interesting?

-- 

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

From libssh2-devel-bounces@cool.haxx.se  Thu Sep  9 23:48:13 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o89Lm7u6009251;
	Thu, 9 Sep 2010 23:48:12 +0200
Received: from mail.ritual.org (146.n01.hh.clusters.de [213.238.52.146])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o89Lm5Bo009203
	for <libssh2-devel@cool.haxx.se>; Thu, 9 Sep 2010 23:48:05 +0200
Received: from spring.local (spring.ritual.org [217.91.25.149])
	(authenticated bits=0)
	by mail.ritual.org (8.12.9/8.12.9) with ESMTP id o89Lm0UF017928
	for <libssh2-devel@cool.haxx.se>; Thu, 9 Sep 2010 23:48:00 +0200
Received: from [IPv6:::1] (localhost [IPv6:::1])
	by spring.local (Postfix) with ESMTP id CA68B321CAD0
	for <libssh2-devel@cool.haxx.se>; Thu,  9 Sep 2010 23:47:59 +0200 (CEST)
Mime-Version: 1.0 (Apple Message framework v1081)
Subject: Re: libssh2_scp_send64: incorrect/unspecific error message
From: Uli Zappe <uli@ritual.org>
In-Reply-To: <alpine.DEB.2.00.1009091910420.24402@tvnag.unkk.fr>
Date: Thu, 9 Sep 2010 23:47:59 +0200
Message-Id: <6CE9FBE7-466A-472B-ACBB-8A6427380267@spring.local>
References: <865A2E79-C252-4D0A-BC60-9F95E53BBCF6@spring.local>
	<ACB50331-63F2-49D1-828A-42A2D6080123@spring.local>
	<alpine.DEB.2.00.1009091910420.24402@tvnag.unkk.fr>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Mailer: Apple Mail (2.1081)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Thu, 09 Sep 2010 23:48:13 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Thu, 09 Sep 2010 23:48:06 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Am 09.09.2010 um 19:11 schrieb Daniel Stenberg:

>> Additionally (and somewhat unrelated), specifying mtime and atime in lib=
ssh2_scp_send64 does not have any effect at all on my systems.
> Have you checked the code and seen if that data is passed on as supposed?

Not yet, as I didn't know what development state libssh2_scp_send64 is curr=
ently supposed to be in. I'll have a look if I can find out what happens.

            Bye
                    Uli
________________________________________________________

  Uli Zappe, Solmsstra=DFe 5, D-65189 Wiesbaden, Germany
  http://www.ritual.org
  Fon: +49-700-ULIZAPPE
  Fax: +49-700-ZAPPEFAX
________________________________________________________

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

From libssh2-devel-bounces@cool.haxx.se  Fri Sep 10 00:07:16 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o89M78K5022833;
	Fri, 10 Sep 2010 00:07:15 +0200
Received: from shell.lmi.net (shell.lmi.net [66.117.140.246])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o89M75LJ022828
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Fri, 10 Sep 2010 00:07:06 +0200
Received: from rcom-software.com (75-101-82-95.dsl2st.lmi.net [75.101.82.95])
	by shell.lmi.net (8.14.1/8.14.1) with ESMTP id o89M6wGb075674
	for <libssh2-devel@cool.haxx.se>; Thu, 9 Sep 2010 15:06:59 -0700 (PDT)
Message-ID: <4C895A91.627720C3@rcom-software.com>
Date: Thu, 09 Sep 2010 15:07:13 -0700
From: Paul Romero <paulr@rcom-software.com>
Organization: RCOM Communications Software
X-Mailer: Mozilla 4.77 [en] (Win95; U)
X-Accept-Language: en,es,de-DE,fr-FR
MIME-Version: 1.0
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: Libssh2: Memory Allocation Failure
References: <4C8838C2.16C11BA8@rcom-software.com>
	<alpine.DEB.2.00.1009092340470.24402@tvnag.unkk.fr>
X-Scanned-By: MIMEDefang 2.37
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Fri, 10 Sep 2010 00:07:16 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Fri, 10 Sep 2010 00:07:07 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Hi Daniel:

Tried it in an x86 environment but maybe not for as
long. However, I did not try using valgrind.

Best Regards,

Paul  r.


Daniel Stenberg wrote:

> On Wed, 8 Sep 2010, Paul Romero wrote:
>
> > Is anybody interested in this problem
>
> Yes, I am.
>
> > or do you have an idea about the cause ?
>
> No...
>
> Did you try running it on a x86 linux for a while using valgrind to see if it
> triggers anything interesting?
>
> --
>
>   / daniel.haxx.se
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

--
Paul Romero

RCOM Communications Software

Phone/Fax: (510)339-2628
E-Mail: paulr@rcom-software.com


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

From libssh2-devel-bounces@cool.haxx.se  Fri Sep 10 00:16:47 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o89MGgse025942;
	Fri, 10 Sep 2010 00:16:47 +0200
Received: from ponderosa.fch.wimsey.bc.ca (zz20920564179.cipherkey.net
	[209.205.64.179])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o89MGejH025934
	for <libssh2-devel@cool.haxx.se>; Fri, 10 Sep 2010 00:16:40 +0200
Received: by coneharvesters.com
	via sendmail with stdio id <m1OtpQ0-000l6IC@ponderosa.fch.wimsey.bc.ca>
	for libssh2-devel@cool.haxx.se; Thu, 9 Sep 2010 15:16:32 -0700 (PDT)
Date: Thu, 9 Sep 2010 15:16:32 -0700
From: Dan Fandrich <dan@coneharvesters.com>
To: libssh2-devel@cool.haxx.se
Subject: Re: Libssh2: Memory Allocation Failure
Message-ID: <20100909221631.GA32354@coneharvesters.com>
Mail-Followup-To: libssh2-devel@cool.haxx.se
References: <4C8838C2.16C11BA8@rcom-software.com>
MIME-Version: 1.0
Content-Disposition: inline
In-Reply-To: <4C8838C2.16C11BA8@rcom-software.com>
User-Agent: Mutt/1.5.19 (2009-01-05)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Fri, 10 Sep 2010 00:16:47 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Fri, 10 Sep 2010 00:16:41 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

On Wed, Sep 08, 2010 at 06:30:42PM -0700, Paul Romero wrote:
> After running the test program attached to this message
> for several hours under uCLinux on a Coldfire 5249 CPU
> the following memory allocation described below occurred.
> The system I ran the test on certainly has at least
> 2 MB spare memory and I don't understand the reason.

But is that 2 MB free memory contiguous?  The lack of an MMU means that
even with that much free memory, an allocation of much less than that
amount can still fail if it's fragmented. 

>>> Dan
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Fri Sep 10 01:15:20 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o89NEjdn024374;
	Fri, 10 Sep 2010 01:15:18 +0200
Received: from mail.ritual.org (146.n01.hh.clusters.de [213.238.52.146])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o89NEhA2024369
	for <libssh2-devel@cool.haxx.se>; Fri, 10 Sep 2010 01:14:43 +0200
Received: from spring.local (spring.ritual.org [217.91.25.149])
	(authenticated bits=0)
	by mail.ritual.org (8.12.9/8.12.9) with ESMTP id o89NEcUF018535
	for <libssh2-devel@cool.haxx.se>; Fri, 10 Sep 2010 01:14:38 +0200
Received: from [IPv6:::1] (localhost [IPv6:::1])
	by spring.local (Postfix) with ESMTP id BCC63321ED30
	for <libssh2-devel@cool.haxx.se>; Fri, 10 Sep 2010 01:14:37 +0200 (CEST)
Mime-Version: 1.0 (Apple Message framework v1081)
Subject: Re: libssh2_scp_send64: incorrect/unspecific error message
From: Uli Zappe <uli@ritual.org>
In-Reply-To: <alpine.DEB.2.00.1009091910420.24402@tvnag.unkk.fr>
Date: Fri, 10 Sep 2010 01:14:37 +0200
Message-Id: <9CF8070A-C0B8-4C24-9ECF-143656CDF1E8@spring.local>
References: <865A2E79-C252-4D0A-BC60-9F95E53BBCF6@spring.local>
	<ACB50331-63F2-49D1-828A-42A2D6080123@spring.local>
	<alpine.DEB.2.00.1009091910420.24402@tvnag.unkk.fr>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Mailer: Apple Mail (2.1081)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Fri, 10 Sep 2010 01:15:20 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Fri, 10 Sep 2010 01:14:44 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Am 09.09.2010 um 19:11 schrieb Daniel Stenberg:

> Have you checked the code and seen if that data is passed on as supposed?

I've taken a look now, and I can't find anything in the code. Running libss=
h2 with debugging enabled (LIBSSH2_TRACE_SCP) shows this (I've set mtime an=
d atime to the fixed value of 1111111111 in my code for easy recognition in=
 the log):

[libssh2] 0.911664 SCP: Opening channel for SCP send
[libssh2] 0.956339 SCP: Sent T1111111111 0 1111111111 0
[libssh2] 0.957310 SCP: Sent C0644 257690 Test.txt

So according to the debug log, the times are sent; however, while Test.txt =
is copied just fine, it has the current time as modification date on the re=
mote machine. If I copy Test.txt with scp (from Mac OS X/OpenSSH) to the sa=
me remote machine, the times are set correctly, so it's not an error at the=
 remote end.

So, the only explanation seems to be that while "T1111111111 0 1111111111 0=
" is indeed sent, it's somehow "misformatted" so that it doesn't achieve th=
e intended effect. Unfortunately, I dont' know anything about the ssh/scp p=
rotocol, so I cannot judge that.

            Bye
                    Uli
________________________________________________________

  Uli Zappe, Solmsstra=DFe 5, D-65189 Wiesbaden, Germany
  http://www.ritual.org
  Fon: +49-700-ULIZAPPE
  Fax: +49-700-ZAPPEFAX
________________________________________________________

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

From libssh2-devel-bounces@cool.haxx.se  Fri Sep 10 04:31:55 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8A2VVCn000919;
	Fri, 10 Sep 2010 04:31:49 +0200
Received: from shell.lmi.net (shell.lmi.net [66.117.140.246])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8A2VR8k000871
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Fri, 10 Sep 2010 04:31:30 +0200
Received: from rcom-software.com (75-101-82-95.dsl2st.lmi.net [75.101.82.95])
	by shell.lmi.net (8.14.1/8.14.1) with ESMTP id o8A2VOFn083201
	for <libssh2-devel@cool.haxx.se>; Thu, 9 Sep 2010 19:31:24 -0700 (PDT)
Message-ID: <4C89988B.34B1DF47@rcom-software.com>
Date: Thu, 09 Sep 2010 19:31:39 -0700
From: Paul Romero <paulr@rcom-software.com>
Organization: RCOM Communications Software
X-Mailer: Mozilla 4.77 [en] (Win95; U)
X-Accept-Language: en,es,de-DE,fr-FR
MIME-Version: 1.0
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: Libssh2: Memory Allocation Failure
References: <4C8838C2.16C11BA8@rcom-software.com>
	<20100909221631.GA32354@coneharvesters.com>
X-Scanned-By: MIMEDefang 2.37
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Fri, 10 Sep 2010 04:31:55 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Fri, 10 Sep 2010 04:31:30 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Hi Dan:

In your opinion, does using libssh_exit() at the end of a transaction
make a difference ?

Best Regards,

Paul R.


Dan Fandrich wrote:

> On Wed, Sep 08, 2010 at 06:30:42PM -0700, Paul Romero wrote:
> > After running the test program attached to this message
> > for several hours under uCLinux on a Coldfire 5249 CPU
> > the following memory allocation described below occurred.
> > The system I ran the test on certainly has at least
> > 2 MB spare memory and I don't understand the reason.
>
> But is that 2 MB free memory contiguous?  The lack of an MMU means that
> even with that much free memory, an allocation of much less than that
> amount can still fail if it's fragmented.
>
> >>> Dan
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

--
Paul Romero

RCOM Communications Software

Phone/Fax: (510)339-2628
E-Mail: paulr@rcom-software.com


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

From libssh2-devel-bounces@cool.haxx.se  Fri Sep 10 05:12:16 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8A3C6ke014481;
	Fri, 10 Sep 2010 05:12:15 +0200
Received: from ponderosa.fch.wimsey.bc.ca (zz20920564179.cipherkey.net
	[209.205.64.179])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8A3C4xR014455
	for <libssh2-devel@cool.haxx.se>; Fri, 10 Sep 2010 05:12:04 +0200
Received: by coneharvesters.com
	via sendmail with stdio id <m1Ottcj-000l6IC@ponderosa.fch.wimsey.bc.ca>
	for libssh2-devel@cool.haxx.se; Thu, 9 Sep 2010 19:45:57 -0700 (PDT)
Date: Thu, 9 Sep 2010 19:45:56 -0700
From: Dan Fandrich <dan@coneharvesters.com>
To: libssh2-devel@cool.haxx.se
Subject: Re: Libssh2: Memory Allocation Failure
Message-ID: <20100910024555.GA664@coneharvesters.com>
Mail-Followup-To: libssh2-devel@cool.haxx.se
References: <4C8838C2.16C11BA8@rcom-software.com>
	<20100909221631.GA32354@coneharvesters.com>
	<4C89988B.34B1DF47@rcom-software.com>
MIME-Version: 1.0
Content-Disposition: inline
In-Reply-To: <4C89988B.34B1DF47@rcom-software.com>
User-Agent: Mutt/1.5.19 (2009-01-05)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Fri, 10 Sep 2010 05:12:16 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Fri, 10 Sep 2010 05:12:05 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

On Thu, Sep 09, 2010 at 07:31:39PM -0700, Paul Romero wrote:
> In your opinion, does using libssh_exit() at the end of a transaction
> make a difference ?

libssh2_exit is practically a no-op in the current implementation,
so calling it won't make any difference to memory usage. But tearing
down and closing all connections between operations would give the
memory allocator a chance to combine more memory blocks and free up
more contiguous space.

>>> Dan
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Fri Sep 10 06:17:17 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8A4H1l5027707;
	Fri, 10 Sep 2010 06:17:15 +0200
Received: from shell.lmi.net (shell.lmi.net [66.117.140.246])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8A4GuCi027691
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Fri, 10 Sep 2010 06:16:59 +0200
Received: from rcom-software.com (75-101-82-95.dsl2st.lmi.net [75.101.82.95])
	by shell.lmi.net (8.14.1/8.14.1) with ESMTP id o8A4GnIM085950
	for <libssh2-devel@cool.haxx.se>; Thu, 9 Sep 2010 21:16:53 -0700 (PDT)
Message-ID: <4C89B140.45D371DD@rcom-software.com>
Date: Thu, 09 Sep 2010 21:17:04 -0700
From: Paul Romero <paulr@rcom-software.com>
Organization: RCOM Communications Software
X-Mailer: Mozilla 4.77 [en] (Win95; U)
X-Accept-Language: en,es,de-DE,fr-FR
MIME-Version: 1.0
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: Libssh2: Memory Allocation Failure
References: <4C8838C2.16C11BA8@rcom-software.com>
	<20100909221631.GA32354@coneharvesters.com>
	<4C89988B.34B1DF47@rcom-software.com>
	<20100910024555.GA664@coneharvesters.com>
X-Scanned-By: MIMEDefang 2.37
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Fri, 10 Sep 2010 06:17:17 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Fri, 10 Sep 2010 06:16:59 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Hi Dan:

Thanks. In fact the test does free all connections in between
transactions.

Best Regards,

Paul R.


Dan Fandrich wrote:

> On Thu, Sep 09, 2010 at 07:31:39PM -0700, Paul Romero wrote:
> > In your opinion, does using libssh_exit() at the end of a transaction
> > make a difference ?
>
> libssh2_exit is practically a no-op in the current implementation,
> so calling it won't make any difference to memory usage. But tearing
> down and closing all connections between operations would give the
> memory allocator a chance to combine more memory blocks and free up
> more contiguous space.
>
> >>> Dan
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

--
Paul Romero

RCOM Communications Software

Phone/Fax: (510)339-2628
E-Mail: paulr@rcom-software.com


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

From libssh2-devel-bounces@cool.haxx.se  Fri Sep 10 08:31:55 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8A6VYBJ013208;
	Fri, 10 Sep 2010 08:31:51 +0200
Received: from giant.haxx.se (giant.haxx.se [80.67.6.50])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8A6VWTl013199
	for <libssh2-devel@cool.haxx.se>; Fri, 10 Sep 2010 08:31:32 +0200
Date: Fri, 10 Sep 2010 08:31:32 +0200 (CEST)
From: Daniel Stenberg <daniel@haxx.se>
X-X-Sender: dast@giant.haxx.se
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: Libssh2: Memory Allocation Failure
In-Reply-To: <4C89B140.45D371DD@rcom-software.com>
Message-ID: <alpine.DEB.2.00.1009100828520.24402@tvnag.unkk.fr>
References: <4C8838C2.16C11BA8@rcom-software.com>
	<20100909221631.GA32354@coneharvesters.com>
	<4C89988B.34B1DF47@rcom-software.com>
	<20100910024555.GA664@coneharvesters.com>
	<4C89B140.45D371DD@rcom-software.com>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
X-fromdanielhimself: yes
MIME-Version: 1.0
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Fri, 10 Sep 2010 08:31:55 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Fri, 10 Sep 2010 08:31:32 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

On Thu, 9 Sep 2010, Paul Romero wrote:

> Thanks. In fact the test does free all connections in between transactions.

libssh2 is not easy on the heap. It allocates and frees a lot of memory chunks 
and if your app does it as well, chances are that the memory pools are so 
fragmented that there isn't any large enough blocks left when libssh2 wants 
one.

I've been wanting to reduce the amount of mallocs but I've not yet gotten 
around actually making that reality...

-- 

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

From libssh2-devel-bounces@cool.haxx.se  Fri Sep 10 08:34:43 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8A6Yebk013893;
	Fri, 10 Sep 2010 08:34:42 +0200
Received: from giant.haxx.se (giant.haxx.se [80.67.6.50])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8A6Ydl7013887
	for <libssh2-devel@cool.haxx.se>; Fri, 10 Sep 2010 08:34:39 +0200
Date: Fri, 10 Sep 2010 08:34:39 +0200 (CEST)
From: Daniel Stenberg <daniel@haxx.se>
X-X-Sender: dast@giant.haxx.se
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: libssh2_scp_send64: incorrect/unspecific error message
In-Reply-To: <9CF8070A-C0B8-4C24-9ECF-143656CDF1E8@spring.local>
Message-ID: <alpine.DEB.2.00.1009100832360.24402@tvnag.unkk.fr>
References: <865A2E79-C252-4D0A-BC60-9F95E53BBCF6@spring.local>
	<ACB50331-63F2-49D1-828A-42A2D6080123@spring.local>
	<alpine.DEB.2.00.1009091910420.24402@tvnag.unkk.fr>
	<9CF8070A-C0B8-4C24-9ECF-143656CDF1E8@spring.local>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
X-fromdanielhimself: yes
MIME-Version: 1.0
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Fri, 10 Sep 2010 08:34:43 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Fri, 10 Sep 2010 08:34:39 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

On Fri, 10 Sep 2010, Uli Zappe wrote:

> So, the only explanation seems to be that while "T1111111111 0 1111111111 0" 
> is indeed sent, it's somehow "misformatted" so that it doesn't achieve the 
> intended effect. Unfortunately, I dont' know anything about the ssh/scp 
> protocol, so I cannot judge that.

None of us knew the protocol until we looked it up and learned it. Try:

   http://blogs.sun.com/janp/entry/how_the_scp_protocol_works

To me it seems the times are sent correctly...

-- 

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

From libssh2-devel-bounces@cool.haxx.se  Fri Sep 10 08:40:57 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8A6ergA017782;
	Fri, 10 Sep 2010 08:40:56 +0200
Received: from oproxy2-pub.bluehost.com (oproxy2-pub.bluehost.com
	[67.222.39.60])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with SMTP id o8A6eofZ017726
	for <libssh2-devel@cool.haxx.se>; Fri, 10 Sep 2010 08:40:52 +0200
Received: (qmail 31737 invoked by uid 0); 10 Sep 2010 06:40:47 -0000
Received: from unknown (HELO box439.bluehost.com) (69.89.31.239)
	by oproxy2.bluehost.com with SMTP; 10 Sep 2010 06:40:46 -0000
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default;
	d=moontechnolabs.com; 
	h=Received:From:Content-Type:Content-Transfer-Encoding:Subject:Date:Message-Id:To:Mime-Version:X-Mailer:X-Identified-User;
	b=PZxnU3n0wQ7YfOCBD4FGtYFJoFgi655G/U4cq9+W9UBKoxqIcJM2yG9yu8wSrlsTRjzqRouH+4IYKTeFOs6zmbx23vF8oiNfV8fm/v5U92ZwUq3WEpZr5WC6rZIe7fJV;
Received: from [122.170.24.41] (helo=[192.168.1.14])
	by box439.bluehost.com with esmtpsa (TLSv1:AES128-SHA:128)
	(Exim 4.69) (envelope-from <paresh.thakor@moontechnolabs.com>)
	id 1OtxHx-0001Od-Ra
	for libssh2-devel@cool.haxx.se; Fri, 10 Sep 2010 00:40:46 -0600
From: Paresh Thakor <paresh.thakor@moontechnolabs.com>
Subject: Editor modes using libssh2
Date: Fri, 10 Sep 2010 12:10:34 +0530
Message-Id: <25A58EE5-0909-4126-903E-DA6B99949FD6@moontechnolabs.com>
To: libssh2 development <libssh2-devel@cool.haxx.se>
Mime-Version: 1.0 (Apple Message framework v1078)
X-Mailer: Apple Mail (2.1078)
X-Identified-User: {1089:box439.bluehost.com:moonsoft:moontechnolabs.com}
	{sentby:smtp auth 122.170.24.41 authed with
	paresh.thakor@moontechnolabs.com}
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Fri, 10 Sep 2010 08:40:57 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Fri, 10 Sep 2010 08:40:52 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Hi,

Nowadays, I was somewhat busy around our SSH application and it's in good condition right now. I am now trying to put navigation keys for the keyboard. In VI when we use navigation keys, up, down, left and right, the cursor moves correspondingly. I have tried to put the encoded characters for this. But i'm not getting proper input from CHANNEL, the cursor is not moving upward, downward, etc. Could anyone suggest me what should I do to implement such functionality? up, down, keys are working perfectly for history, but not working in VI editor mode. But if libssh2 has any function, we can come to know that right now channels is in editor mode, etc? It would be great. May anyone has solution for this and suggest me something valuable.

Regards,
Paresh Thakor.
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Fri Sep 10 09:19:33 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8A7JPDW007433;
	Fri, 10 Sep 2010 09:19:32 +0200
Received: from ponderosa.fch.wimsey.bc.ca (zz20920564179.cipherkey.net
	[209.205.64.179])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8A7JNsI007425
	for <libssh2-devel@cool.haxx.se>; Fri, 10 Sep 2010 09:19:23 +0200
Received: by coneharvesters.com
	via sendmail with stdio id <m1OtxtC-000l6IC@ponderosa.fch.wimsey.bc.ca>
	for libssh2-devel@cool.haxx.se; Fri, 10 Sep 2010 00:19:14 -0700 (PDT)
Date: Fri, 10 Sep 2010 00:19:13 -0700
From: Dan Fandrich <dan@coneharvesters.com>
To: libssh2-devel@cool.haxx.se
Subject: Re: Editor modes using libssh2
Message-ID: <20100910071912.GA1562@coneharvesters.com>
Mail-Followup-To: libssh2-devel@cool.haxx.se
References: <25A58EE5-0909-4126-903E-DA6B99949FD6@moontechnolabs.com>
MIME-Version: 1.0
Content-Disposition: inline
In-Reply-To: <25A58EE5-0909-4126-903E-DA6B99949FD6@moontechnolabs.com>
User-Agent: Mutt/1.5.19 (2009-01-05)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Fri, 10 Sep 2010 09:19:33 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Fri, 10 Sep 2010 09:19:24 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

On Fri, Sep 10, 2010 at 12:10:34PM +0530, Paresh Thakor wrote:
> Nowadays, I was somewhat busy around our SSH application and it's in
> good condition right now. I am now trying to put navigation keys for the
> keyboard. In VI when we use navigation keys, up, down, left and right, the
> cursor moves correspondingly. I have tried to put the encoded characters
> for this. But i'm not getting proper input from CHANNEL, the cursor is
> not moving upward, downward, etc. Could anyone suggest me what should I
> do to implement such functionality? up, down, keys are working perfectly
> for history, but not working in VI editor mode. But if libssh2 has any
> function, we can come to know that right now channels is in editor mode,
> etc? It would be great. May anyone has solution for this and suggest me
> something valuable.

I don't know anything about how your application interacts with a terminal
emulator. But if it allows logging into a *nix system, the remote system
likely uses the TERM environment variable to determine what terminal
emulator is running on the client side. You should send that variable across
to the server when logging in, then make sure that the characters sent for
the various cursor movement keys match what's expected for that terminal
type.

>>> Dan
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Fri Sep 10 09:47:03 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8A7koWv027123;
	Fri, 10 Sep 2010 09:47:01 +0200
Received: from mail.ritual.org (146.n01.hh.clusters.de [213.238.52.146])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8A7kndn027120
	for <libssh2-devel@cool.haxx.se>; Fri, 10 Sep 2010 09:46:50 +0200
Received: from spring.local (spring.ritual.org [217.91.25.149])
	(authenticated bits=0)
	by mail.ritual.org (8.12.9/8.12.9) with ESMTP id o8A7klUF021183
	for <libssh2-devel@cool.haxx.se>; Fri, 10 Sep 2010 09:46:47 +0200
Received: from [IPv6:::1] (localhost [IPv6:::1])
	by spring.local (Postfix) with ESMTP id 8A2A932205B1
	for <libssh2-devel@cool.haxx.se>; Fri, 10 Sep 2010 09:46:47 +0200 (CEST)
Mime-Version: 1.0 (Apple Message framework v1081)
Subject: preserving access and modification time (was Re: libssh2_scp_send64:
	incorrect/unspecific error message)
From: Uli Zappe <uli@ritual.org>
In-Reply-To: <alpine.DEB.2.00.1009100832360.24402@tvnag.unkk.fr>
Date: Fri, 10 Sep 2010 09:46:47 +0200
Message-Id: <BC54DE87-9AF5-4460-83A4-270B4334AF72@spring.local>
References: <865A2E79-C252-4D0A-BC60-9F95E53BBCF6@spring.local>
	<ACB50331-63F2-49D1-828A-42A2D6080123@spring.local>
	<alpine.DEB.2.00.1009091910420.24402@tvnag.unkk.fr>
	<9CF8070A-C0B8-4C24-9ECF-143656CDF1E8@spring.local>
	<alpine.DEB.2.00.1009100832360.24402@tvnag.unkk.fr>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Mailer: Apple Mail (2.1081)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Fri, 10 Sep 2010 09:47:03 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Fri, 10 Sep 2010 09:46:50 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Am 10.09.2010 um 08:34 schrieb Daniel Stenberg:

> On Fri, 10 Sep 2010, Uli Zappe wrote:
> =

>> So, the only explanation seems to be that while "T1111111111 0 111111111=
1 0" is indeed sent, it's somehow "misformatted" so that it doesn't achieve=
 the intended effect. Unfortunately, I dont' know anything about the ssh/sc=
p protocol, so I cannot judge that.
> =

> None of us knew the protocol until we looked it up and learned it. Try:
> =

>  http://blogs.sun.com/janp/entry/how_the_scp_protocol_works

Thanks for the link, very nice!

> To me it seems the times are sent correctly...

Well, interestingly the linked article describes several scenarios, but not=
ably exactly what is the issue at hand is missing: preserving the modificat=
ion time when you copy a file *to* the remote side. (Copying *from* the rem=
ote host preserves the time just fine for me in the examples of the article=
, and in libssh2, too.)

Now, of course you would think that the time preserving examples of the lin=
ked article would work as well the other way round, i.e. doing something li=
ke

$ scp -pt /tmp
$ T1183832947 0 1183833773 0
$ C0644 6 test
$ [content]

However, this does *not* work; it doesn't affect the modification time at a=
ll (I also tried scp -p -t without success, just to make sure). Since this =
seems to be exactly what libssh2 does, it's no wonder that this doesn't wor=
k, either.

In contrast, using (OpenSSH's) scp in a "regular" way (scp -p source target=
) works just fine. So there are two obvious questions:

1. What is it (at least on Mac OS X) that OpenSSH at the remote end expects=
 that the above usage (scp -pt /tmp ...) does not deliver, but the "regular=
" use of scp (scp -p source target) does?

2. Is this a peculiarity of Mac OS X's version of OpenSSH? I very much doub=
t it, but it would be good to cross-check with OpenSSH on Linux & Co, to ma=
ke sure it is as basic a problem as it seems to be.

            Bye
                    Uli
________________________________________________________

  Uli Zappe, Solmsstra=DFe 5, D-65189 Wiesbaden, Germany
  http://www.ritual.org
  Fon: +49-700-ULIZAPPE
  Fax: +49-700-ZAPPEFAX
________________________________________________________

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

From libssh2-devel-bounces@cool.haxx.se  Fri Sep 10 10:07:43 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8A87ZaU007339;
	Fri, 10 Sep 2010 10:07:42 +0200
Received: from mail.ritual.org (146.n01.hh.clusters.de [213.238.52.146])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8A87XNL007333
	for <libssh2-devel@cool.haxx.se>; Fri, 10 Sep 2010 10:07:34 +0200
Received: from spring.local (spring.ritual.org [217.91.25.149])
	(authenticated bits=0)
	by mail.ritual.org (8.12.9/8.12.9) with ESMTP id o8A87WUF021325
	for <libssh2-devel@cool.haxx.se>; Fri, 10 Sep 2010 10:07:32 +0200
Received: from [IPv6:::1] (localhost [IPv6:::1])
	by spring.local (Postfix) with ESMTP id 78D2D322065A
	for <libssh2-devel@cool.haxx.se>; Fri, 10 Sep 2010 10:07:32 +0200 (CEST)
Mime-Version: 1.0 (Apple Message framework v1081)
Subject: Re: preserving access and modification time
From: Uli Zappe <uli@ritual.org>
In-Reply-To: <BC54DE87-9AF5-4460-83A4-270B4334AF72@spring.local>
Date: Fri, 10 Sep 2010 10:07:31 +0200
Message-Id: <BC958CEB-CD80-4D62-B001-ACDBDFDE4173@spring.local>
References: <865A2E79-C252-4D0A-BC60-9F95E53BBCF6@spring.local>
	<ACB50331-63F2-49D1-828A-42A2D6080123@spring.local>
	<alpine.DEB.2.00.1009091910420.24402@tvnag.unkk.fr>
	<9CF8070A-C0B8-4C24-9ECF-143656CDF1E8@spring.local>
	<alpine.DEB.2.00.1009100832360.24402@tvnag.unkk.fr>
	<BC54DE87-9AF5-4460-83A4-270B4334AF72@spring.local>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Mailer: Apple Mail (2.1081)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Fri, 10 Sep 2010 10:07:43 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Fri, 10 Sep 2010 10:07:34 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

One addition: I wasn't aware until now that OpenSSH's scp has a nice verbos=
e mode that lists the complete communication with the remote end, and indee=
d, it seems no different from what the article examples and libssh2 do. Of =
course, this makes the issue even more mysterious ...

            Bye
                    Uli
________________________________________________________

  Uli Zappe, Solmsstra=DFe 5, D-65189 Wiesbaden, Germany
  http://www.ritual.org
  Fon: +49-700-ULIZAPPE
  Fax: +49-700-ZAPPEFAX
________________________________________________________

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

From libssh2-devel-bounces@cool.haxx.se  Fri Sep 10 13:20:10 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8ABJkKQ028793;
	Fri, 10 Sep 2010 13:20:06 +0200
Received: from oproxy2-pub.bluehost.com (oproxy2-pub.bluehost.com
	[67.222.39.60])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with SMTP id o8ABJf0Y028765
	for <libssh2-devel@cool.haxx.se>; Fri, 10 Sep 2010 13:19:44 +0200
Received: (qmail 26491 invoked by uid 0); 10 Sep 2010 11:19:30 -0000
Received: from unknown (HELO box439.bluehost.com) (69.89.31.239)
	by oproxy2.bluehost.com with SMTP; 10 Sep 2010 11:19:30 -0000
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default;
	d=moontechnolabs.com; 
	h=Received:From:Content-Type:Content-Transfer-Encoding:Subject:Date:Message-Id:To:Mime-Version:X-Mailer:X-Identified-User;
	b=Un4YYMRdmaSd0rSrPUrA70itQRrIHXODfY5Nrn/bYvZwUvAIyhGxf8d949wDcWR967y9viTncbtUtU4nzpL83jRNPzKepHg+Mcn+XrKqogOir7FRz6dbOZGmSkUfXbIP;
Received: from [122.170.24.41] (helo=[192.168.1.14])
	by box439.bluehost.com with esmtpsa (TLSv1:AES128-SHA:128)
	(Exim 4.69) (envelope-from <paresh.thakor@moontechnolabs.com>)
	id 1Ou1dh-0003RA-GY
	for libssh2-devel@cool.haxx.se; Fri, 10 Sep 2010 05:19:30 -0600
From: Paresh Thakor <paresh.thakor@moontechnolabs.com>
Subject: Key-based authentication with libssh2_userauth_publickey_fromfile()
Date: Fri, 10 Sep 2010 16:49:24 +0530
Message-Id: <6FB7ECA1-626D-4622-BB8A-7D57E86A5150@moontechnolabs.com>
To: libssh2 development <libssh2-devel@cool.haxx.se>
Mime-Version: 1.0 (Apple Message framework v1078)
X-Mailer: Apple Mail (2.1078)
X-Identified-User: {1089:box439.bluehost.com:moonsoft:moontechnolabs.com}
	{sentby:smtp auth 122.170.24.41 authed with
	paresh.thakor@moontechnolabs.com}
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Fri, 10 Sep 2010 13:20:10 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Fri, 10 Sep 2010 13:19:45 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Hi,

Anyone does know how can i pass file path for public/private keys into 
libssh2_userauth_publickey_fromfile()
in iPhone SDK.?

I'm generating public/private key with iPhone SDK security.framework but it's not working with the above function. I don't know what's wrong.

Regards,
Paresh Thakor.
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Fri Sep 10 17:56:19 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8AFtsRB031886;
	Fri, 10 Sep 2010 17:56:14 +0200
Received: from shell.lmi.net (shell.lmi.net [66.117.140.246])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8AFtoZt031856
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Fri, 10 Sep 2010 17:55:52 +0200
Received: from rcom-software.com (75-101-82-95.dsl2st.lmi.net [75.101.82.95])
	by shell.lmi.net (8.14.1/8.14.1) with ESMTP id o8AFtecX002804
	for <libssh2-devel@cool.haxx.se>; Fri, 10 Sep 2010 08:55:45 -0700 (PDT)
Message-ID: <4C8A550A.35275BB7@rcom-software.com>
Date: Fri, 10 Sep 2010 08:55:55 -0700
From: Paul Romero <paulr@rcom-software.com>
Organization: RCOM Communications Software
X-Mailer: Mozilla 4.77 [en] (Win95; U)
X-Accept-Language: en,es,de-DE,fr-FR
MIME-Version: 1.0
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: Libssh2: Memory Allocation Failure
References: <4C8838C2.16C11BA8@rcom-software.com>
	<20100909221631.GA32354@coneharvesters.com>
	<4C89988B.34B1DF47@rcom-software.com>
	<20100910024555.GA664@coneharvesters.com>
	<4C89B140.45D371DD@rcom-software.com>
	<alpine.DEB.2.00.1009100828520.24402@tvnag.unkk.fr>
X-Scanned-By: MIMEDefang 2.37
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Fri, 10 Sep 2010 17:56:19 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Fri, 10 Sep 2010 17:55:52 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Hi Daniel:

What you wrote seems reasonable.   I ran the test again
for a much longer period in an i86 environment and no
memory allocation failures occurred.  Of course, the
uClinux environment has much less spare memory--
a little more than 2 MB.  I think it is relevant that
no other tasks--other than uClinux system background
tasks, were running when I ran the test on uClinux.

Best Regards,

Paul   R.


Daniel Stenberg wrote:

> On Thu, 9 Sep 2010, Paul Romero wrote:
>
> > Thanks. In fact the test does free all connections in between transactions.
>
> libssh2 is not easy on the heap. It allocates and frees a lot of memory chunks
> and if your app does it as well, chances are that the memory pools are so
> fragmented that there isn't any large enough blocks left when libssh2 wants
> one.
>
> I've been wanting to reduce the amount of mallocs but I've not yet gotten
> around actually making that reality...
>
> --
>
>   / daniel.haxx.se
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

--
Paul Romero

RCOM Communications Software

Phone/Fax: (510)339-2628
E-Mail: paulr@rcom-software.com


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

From libssh2-devel-bounces@cool.haxx.se  Fri Sep 10 18:09:54 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8AG9n6O009336;
	Fri, 10 Sep 2010 18:09:54 +0200
Received: from toccata.fugue.com (toccata.fugue.com [204.152.186.142])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8AG9lgF009329
	for <libssh2-devel@cool.haxx.se>; Fri, 10 Sep 2010 18:09:47 +0200
Received: from [IPv6:2001::53aa:64c:0:1682:525d:2925] (unknown
	[IPv6:2001:0:53aa:64c:0:1682:525d:2925])
	by toccata.fugue.com (Postfix) with ESMTPSA id 6598134E46F1
	for <libssh2-devel@cool.haxx.se>; Fri, 10 Sep 2010 12:10:00 -0400 (EDT)
Mime-Version: 1.0 (Apple Message framework v1081)
Subject: Re: Key-based authentication with
	libssh2_userauth_publickey_fromfile()
From: Ted Lemon <mellon@fugue.com>
In-Reply-To: <6FB7ECA1-626D-4622-BB8A-7D57E86A5150@moontechnolabs.com>
Date: Fri, 10 Sep 2010 12:09:41 -0400
Message-Id: <91AD0A98-B373-49F7-A018-B4E490969F2C@fugue.com>
References: <6FB7ECA1-626D-4622-BB8A-7D57E86A5150@moontechnolabs.com>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Mailer: Apple Mail (2.1081)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Fri, 10 Sep 2010 18:09:54 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Fri, 10 Sep 2010 18:09:48 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

On Sep 10, 2010, at 7:19 AM, Paresh Thakor wrote:
> Anyone does know how can i pass file path for public/private keys into 
> libssh2_userauth_publickey_fromfile()
> in iPhone SDK.?

      rc = libssh2_userauth_publickey_fromfile(session,
                                               "foo", [pubkey UTF8String],
                                               [privkey UTF8String], "");

pubkey and privkey are NSString objects containing filename paths.

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

From libssh2-devel-bounces@cool.haxx.se  Sat Sep 11 06:59:23 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8B4wtjY011141;
	Sat, 11 Sep 2010 06:59:19 +0200
Received: from oproxy3-pub.bluehost.com (oproxy3-pub.bluehost.com [69.89.21.8])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with SMTP id o8B4wpRj011117
	for <libssh2-devel@cool.haxx.se>; Sat, 11 Sep 2010 06:58:53 +0200
Received: (qmail 17631 invoked by uid 0); 11 Sep 2010 04:58:48 -0000
Received: from unknown (HELO box439.bluehost.com) (69.89.31.239)
	by oproxy3.bluehost.com with SMTP; 11 Sep 2010 04:58:48 -0000
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default;
	d=moontechnolabs.com; 
	h=Received:From:Mime-Version:Content-Type:Subject:Date:In-Reply-To:To:References:Message-Id:X-Mailer:X-Identified-User;
	b=dNp7Efa6h3wkUIcQcxC2bqQXid59a6tQnWada4Q08IRlRIQ1BQBCnm39vdjtP7VRfmhg9YcjpRbyMU1cB+L6RKehFTYXnLpydfUE4awf8H4SmfNKPQ+tFUZS1Bl9lWFk;
Received: from [122.170.24.41] (helo=[192.168.1.14])
	by box439.bluehost.com with esmtpsa (TLSv1:AES128-SHA:128)
	(Exim 4.69) (envelope-from <paresh.thakor@moontechnolabs.com>)
	id 1OuIAp-0002dv-Qy
	for libssh2-devel@cool.haxx.se; Fri, 10 Sep 2010 22:58:48 -0600
From: Paresh Thakor <paresh.thakor@moontechnolabs.com>
Mime-Version: 1.0 (Apple Message framework v1078)
Subject: Re: Key-based authentication with
	libssh2_userauth_publickey_fromfile()
Date: Sat, 11 Sep 2010 10:28:42 +0530
In-Reply-To: <91AD0A98-B373-49F7-A018-B4E490969F2C@fugue.com>
To: libssh2 development <libssh2-devel@cool.haxx.se>
References: <6FB7ECA1-626D-4622-BB8A-7D57E86A5150@moontechnolabs.com>
	<91AD0A98-B373-49F7-A018-B4E490969F2C@fugue.com>
Message-Id: <8B56F4D9-E993-4052-8917-BE7887AC5C87@moontechnolabs.com>
X-Mailer: Apple Mail (2.1078)
X-Identified-User: {1089:box439.bluehost.com:moonsoft:moontechnolabs.com}
	{sentby:smtp auth 122.170.24.41 authed with
	paresh.thakor@moontechnolabs.com}
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Sat, 11 Sep 2010 06:59:23 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Sat, 11 Sep 2010 06:58:53 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0274175464=="
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se


--===============0274175464==
Content-Type: multipart/alternative; boundary=Apple-Mail-1-931244697


--Apple-Mail-1-931244697
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

Yes, right they are path to the files where our public/private keys are =
being stored. But I think i generate key-pair using Security.framework, =
SecKeyGeneratePair(). But i don't think this function returns me proper =
key-pair, because i have generated keypair using other programs which =
gives me different pair than what i get from the above function. So, i =
can't authenticate using keypair. Do i need to do any encoding, decoding =
for the keypair? Anything more can you suggest me so i can implement =
public/private keys?

If you know can you please let me know about generate key-pair and store =
it?
Regards,
Paresh Thakor.


On Sep 10, 2010, at 9:39 PM, Ted Lemon wrote:

> On Sep 10, 2010, at 7:19 AM, Paresh Thakor wrote:
>> Anyone does know how can i pass file path for public/private keys =
into=20
>> libssh2_userauth_publickey_fromfile()
>> in iPhone SDK.?
>=20
>      rc =3D libssh2_userauth_publickey_fromfile(session,
>                                               "foo", [pubkey =
UTF8String],
>                                               [privkey UTF8String], =
"");
>=20
> pubkey and privkey are NSString objects containing filename paths.
>=20
> _______________________________________________
> libssh2-devel =
http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


--Apple-Mail-1-931244697
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=us-ascii

<html><head></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; =
"><div>Yes, right they are path to the files where our public/private =
keys are being stored. But I think i generate key-pair using =
Security.framework,&nbsp;<span class=3D"Apple-style-span" style=3D"color: =
rgb(64, 3, 129); font-family: Menlo; font-size: 11px; =
">SecKeyGeneratePair()</span>. But i don't think this function returns =
me proper key-pair, because i have generated keypair using other =
programs which gives me different pair than what i get from the above =
function. So, i can't authenticate using keypair. Do i need to do any =
encoding, decoding for the keypair? Anything more can you suggest me so =
i can implement public/private keys?</div><div><br></div><div>If you =
know can you please let me know about generate key-pair and store =
it?</div><div>Regards,</div><div>Paresh =
Thakor.</div><div><br></div><br><div><div>On Sep 10, 2010, at 9:39 PM, =
Ted Lemon wrote:</div><br class=3D"Apple-interchange-newline"><blockquote =
type=3D"cite"><div>On Sep 10, 2010, at 7:19 AM, Paresh Thakor =
wrote:<br><blockquote type=3D"cite">Anyone does know how can i pass file =
path for public/private keys into <br></blockquote><blockquote =
type=3D"cite">libssh2_userauth_publickey_fromfile()<br></blockquote><block=
quote type=3D"cite">in iPhone SDK.?<br></blockquote><br> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rc =3D =
libssh2_userauth_publickey_fromfile(session,<br> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"foo", [pubkey =
UTF8String],<br> =
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs=
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[privkey =
UTF8String], "");<br><br>pubkey and privkey are NSString objects =
containing filename =
paths.<br><br>_______________________________________________<br>libssh2-d=
evel <a =
href=3D"http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel">http:/=
/cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel</a><br></div></blockq=
uote></div><br></body></html>=

--Apple-Mail-1-931244697--

--===============0274175464==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============0274175464==--

From libssh2-devel-bounces@cool.haxx.se  Sat Sep 11 07:09:49 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8B59hPF019854;
	Sat, 11 Sep 2010 07:09:48 +0200
Received: from toccata.fugue.com (toccata.fugue.com [204.152.186.142])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8B59fGL019851
	for <libssh2-devel@cool.haxx.se>; Sat, 11 Sep 2010 07:09:42 +0200
Received: from [10.1.10.11] (173-162-214-218-NewEngland.hfc.comcastbusiness.net
	[173.162.214.218])
	by toccata.fugue.com (Postfix) with ESMTPSA id 2310934E45D8
	for <libssh2-devel@cool.haxx.se>; Sat, 11 Sep 2010 01:09:57 -0400 (EDT)
From: Ted Lemon <mellon@fugue.com>
Mime-Version: 1.0 (Apple Message framework v1081)
Subject: Re: Key-based authentication with
	libssh2_userauth_publickey_fromfile()
Date: Sat, 11 Sep 2010 01:09:38 -0400
In-Reply-To: <8B56F4D9-E993-4052-8917-BE7887AC5C87@moontechnolabs.com>
To: libssh2 development <libssh2-devel@cool.haxx.se>
References: <6FB7ECA1-626D-4622-BB8A-7D57E86A5150@moontechnolabs.com>
	<91AD0A98-B373-49F7-A018-B4E490969F2C@fugue.com>
	<8B56F4D9-E993-4052-8917-BE7887AC5C87@moontechnolabs.com>
Message-Id: <8F35CB87-114F-4677-86B0-37DDE4C40996@fugue.com>
X-Mailer: Apple Mail (2.1081)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Sat, 11 Sep 2010 07:09:49 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Sat, 11 Sep 2010 07:09:42 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0622298089=="
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se


--===============0622298089==
Content-Type: multipart/alternative; boundary=Apple-Mail-2-931900505


--Apple-Mail-2-931900505
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

On Sep 11, 2010, at 12:58 AM, Paresh Thakor wrote:
> Yes, right they are path to the files where our public/private keys =
are being stored. But I think i generate key-pair using =
Security.framework, SecKeyGeneratePair(). But i don't think this =
function returns me proper key-pair, because i have generated keypair =
using other programs which gives me different pair than what i get from =
the above function. So, i can't authenticate using keypair. Do i need to =
do any encoding, decoding for the keypair? Anything more can you suggest =
me so i can implement public/private keys?

Hm, I thought I sent you a pretty detailed suggestion for how to do this =
a while back.   My suggestion involved using the in-memory version of =
userauth_publickey instead of the one that loads the key from a file.   =
That would probably work with the key you generate with =
SecKeyGeneratePair().   However, you would still need to get the public =
key into the authorized keys file on the host you're trying to connect =
to.

For that, as you say, you need to write the public key in the right =
format.   I don't actually know what that is, but looking at my own =
id_dsa.pub file, it looks like if you output a line that starts with the =
letters "ssh-dss " (don't include the quotes), and is followed by the =
base-64 representation of the public key, and ends with a key name =
(usually username@hostname), followed by a newline, that ought to work.  =
 But I haven't tried it, so I could easily be wrong.


--Apple-Mail-2-931900505
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=us-ascii

<html><head></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; =
"><div><div>On Sep 11, 2010, at 12:58 AM, Paresh Thakor =
wrote:</div><blockquote type=3D"cite"><span class=3D"Apple-style-span" =
style=3D"border-collapse: separate; font-family: Helvetica; font-style: =
normal; font-variant: normal; font-weight: normal; letter-spacing: =
normal; line-height: normal; orphans: 2; text-indent: 0px; =
text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; =
-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: =
0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =
auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Yes, right =
they are path to the files where our public/private keys are being =
stored. But I think i generate key-pair using =
Security.framework,&nbsp;<span class=3D"Apple-style-span" style=3D"color: =
rgb(64, 3, 129); font-family: Menlo; font-size: 11px; =
">SecKeyGeneratePair()</span>. But i don't think this function returns =
me proper key-pair, because i have generated keypair using other =
programs which gives me different pair than what i get from the above =
function. So, i can't authenticate using keypair. Do i need to do any =
encoding, decoding for the keypair? Anything more can you suggest me so =
i can implement public/private =
keys?</span></blockquote></div><br><div>Hm, I thought I sent you a =
pretty detailed suggestion for how to do this a while back. &nbsp; My =
suggestion involved using the in-memory version of userauth_publickey =
instead of the one that loads the key from a file. &nbsp; That would =
probably work with the key you generate with SecKeyGeneratePair(). =
&nbsp; However, you would still need to get the public key into the =
authorized keys file on the host you're trying to connect =
to.</div><div><br></div><div>For that, as you say, you need to write the =
public key in the right format. &nbsp; I don't actually know what that =
is, but looking at my own id_dsa.pub file, it looks like if you output a =
line that starts with the letters "ssh-dss " (don't include the quotes), =
and is followed by the base-64 representation of the public key, and =
ends with a key name (usually username@hostname), followed by a newline, =
that ought to work. &nbsp; But I haven't tried it, so I could easily be =
wrong.</div><div><br></div></body></html>=

--Apple-Mail-2-931900505--

--===============0622298089==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============0622298089==--

From libssh2-devel-bounces@cool.haxx.se  Sat Sep 11 07:17:41 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8B5HZZv022828;
	Sat, 11 Sep 2010 07:17:40 +0200
Received: from oproxy1-pub.bluehost.com (oproxy1-pub.bluehost.com
	[66.147.249.253])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with SMTP id o8B5HXth022822
	for <libssh2-devel@cool.haxx.se>; Sat, 11 Sep 2010 07:17:34 +0200
Received: (qmail 4827 invoked by uid 0); 11 Sep 2010 05:20:09 -0000
Received: from unknown (HELO box439.bluehost.com) (69.89.31.239)
	by oproxy1.bluehost.com.bluehost.com with SMTP;
	11 Sep 2010 05:20:09 -0000
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default;
	d=moontechnolabs.com; 
	h=Received:From:Mime-Version:Content-Type:Subject:Date:In-Reply-To:To:References:Message-Id:X-Mailer:X-Identified-User;
	b=juwcwBBDg1ecF4CT6UJcVoNzXydjnLC7kSM74yJCbykIQc9wY0LDhBBHPR20ogbu8Fx2HT+HvjPDU8Cf9KQA73GCWQ6NBYlG/pGuWk36GgVkxmA77VLo/9TfCoWATeDu;
Received: from [122.170.24.41] (helo=[192.168.1.14])
	by box439.bluehost.com with esmtpsa (TLSv1:AES128-SHA:128)
	(Exim 4.69) (envelope-from <paresh.thakor@moontechnolabs.com>)
	id 1OuISw-0005cE-Vs
	for libssh2-devel@cool.haxx.se; Fri, 10 Sep 2010 23:17:32 -0600
From: Paresh Thakor <paresh.thakor@moontechnolabs.com>
Mime-Version: 1.0 (Apple Message framework v1078)
Subject: Re: Key-based authentication with
	libssh2_userauth_publickey_fromfile()
Date: Sat, 11 Sep 2010 10:47:25 +0530
In-Reply-To: <8F35CB87-114F-4677-86B0-37DDE4C40996@fugue.com>
To: libssh2 development <libssh2-devel@cool.haxx.se>
References: <6FB7ECA1-626D-4622-BB8A-7D57E86A5150@moontechnolabs.com>
	<91AD0A98-B373-49F7-A018-B4E490969F2C@fugue.com>
	<8B56F4D9-E993-4052-8917-BE7887AC5C87@moontechnolabs.com>
	<8F35CB87-114F-4677-86B0-37DDE4C40996@fugue.com>
Message-Id: <5333D3E9-ED1E-4BBD-847B-7BB1C8A469C5@moontechnolabs.com>
X-Mailer: Apple Mail (2.1078)
X-Identified-User: {1089:box439.bluehost.com:moonsoft:moontechnolabs.com}
	{sentby:smtp auth 122.170.24.41 authed with
	paresh.thakor@moontechnolabs.com}
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Sat, 11 Sep 2010 07:17:41 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Sat, 11 Sep 2010 07:17:34 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0353604595=="
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se


--===============0353604595==
Content-Type: multipart/alternative; boundary=Apple-Mail-2-932367914


--Apple-Mail-2-932367914
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

Thanks, okay, i'll get work on it again and test it. About format of =
public key i need to work, and will test it. But my main question is =
generation of the key-pair, I don't know my key file format might be =
wrong or generated key might be wrong, but i don't know what is the =
problem.

But i have put the file in right format few days back and i have also =
done that copying file and other process on remote host to which i want =
to connect.

So, i don't know the function return right keypair or not. Do i need to =
do any other things for key generation or Security.framework's =
SecKeyGeneratePair() is okay?

Regards,
Paresh Thakor.


On Sep 11, 2010, at 10:39 AM, Ted Lemon wrote:

> On Sep 11, 2010, at 12:58 AM, Paresh Thakor wrote:
>> Yes, right they are path to the files where our public/private keys =
are being stored. But I think i generate key-pair using =
Security.framework, SecKeyGeneratePair(). But i don't think this =
function returns me proper key-pair, because i have generated keypair =
using other programs which gives me different pair than what i get from =
the above function. So, i can't authenticate using keypair. Do i need to =
do any encoding, decoding for the keypair? Anything more can you suggest =
me so i can implement public/private keys?
>=20
> Hm, I thought I sent you a pretty detailed suggestion for how to do =
this a while back.   My suggestion involved using the in-memory version =
of userauth_publickey instead of the one that loads the key from a file. =
  That would probably work with the key you generate with =
SecKeyGeneratePair().   However, you would still need to get the public =
key into the authorized keys file on the host you're trying to connect =
to.
>=20
> For that, as you say, you need to write the public key in the right =
format.   I don't actually know what that is, but looking at my own =
id_dsa.pub file, it looks like if you output a line that starts with the =
letters "ssh-dss " (don't include the quotes), and is followed by the =
base-64 representation of the public key, and ends with a key name =
(usually username@hostname), followed by a newline, that ought to work.  =
 But I haven't tried it, so I could easily be wrong.
>=20
> _______________________________________________
> libssh2-devel =
http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel


--Apple-Mail-2-932367914
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=us-ascii

<html><head></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; =
"><div>Thanks, okay, i'll get work on it again and test it. About format =
of public key i need to work, and will test it. But my main question is =
generation of the key-pair, I don't know my key file format might be =
wrong or generated key might be wrong, but i don't know what is the =
problem.</div><div><br></div><div>But i have put the file in right =
format few days back and i have also done that copying file and other =
process on remote host to which i want to =
connect.</div><div><br></div><div>So, i don't know the function return =
right keypair or not. Do i need to do any other things for key =
generation or Security.framework's <b>SecKeyGeneratePair()</b> is =
okay?</div><div><br></div><div>Regards,</div><div>Paresh =
Thakor.</div><div><br></div><br><div><div>On Sep 11, 2010, at 10:39 AM, =
Ted Lemon wrote:</div><br class=3D"Apple-interchange-newline"><blockquote =
type=3D"cite"><div style=3D"word-wrap: break-word; -webkit-nbsp-mode: =
space; -webkit-line-break: after-white-space; "><div><div>On Sep 11, =
2010, at 12:58 AM, Paresh Thakor wrote:</div><blockquote =
type=3D"cite"><span class=3D"Apple-style-span" style=3D"border-collapse: =
separate; font-family: Helvetica; font-style: normal; font-variant: =
normal; font-weight: normal; letter-spacing: normal; line-height: =
normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: =
normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: =
0px; -webkit-border-vertical-spacing: 0px; =
-webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =
auto; -webkit-text-stroke-width: 0px; font-size: medium; ">Yes, right =
they are path to the files where our public/private keys are being =
stored. But I think i generate key-pair using =
Security.framework,&nbsp;<span class=3D"Apple-style-span" style=3D"color: =
rgb(64, 3, 129); font-family: Menlo; font-size: 11px; =
">SecKeyGeneratePair()</span>. But i don't think this function returns =
me proper key-pair, because i have generated keypair using other =
programs which gives me different pair than what i get from the above =
function. So, i can't authenticate using keypair. Do i need to do any =
encoding, decoding for the keypair? Anything more can you suggest me so =
i can implement public/private =
keys?</span></blockquote></div><br><div>Hm, I thought I sent you a =
pretty detailed suggestion for how to do this a while back. &nbsp; My =
suggestion involved using the in-memory version of userauth_publickey =
instead of the one that loads the key from a file. &nbsp; That would =
probably work with the key you generate with SecKeyGeneratePair(). =
&nbsp; However, you would still need to get the public key into the =
authorized keys file on the host you're trying to connect =
to.</div><div><br></div><div>For that, as you say, you need to write the =
public key in the right format. &nbsp; I don't actually know what that =
is, but looking at my own id_dsa.pub file, it looks like if you output a =
line that starts with the letters "ssh-dss " (don't include the quotes), =
and is followed by the base-64 representation of the public key, and =
ends with a key name (usually username@hostname), followed by a newline, =
that ought to work. &nbsp; But I haven't tried it, so I could easily be =
wrong.</div><div><br></div></div>_________________________________________=
______<br>libssh2-devel <a =
href=3D"http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel">http:/=
/cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel</a><br></blockquote><=
/div><br></body></html>=

--Apple-Mail-2-932367914--

--===============0353604595==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============0353604595==--

From libssh2-devel-bounces@cool.haxx.se  Sat Sep 11 07:39:23 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8B5dGSq001663;
	Sat, 11 Sep 2010 07:39:22 +0200
Received: from toccata.fugue.com (toccata.fugue.com [204.152.186.142])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8B5dDB9001604
	for <libssh2-devel@cool.haxx.se>; Sat, 11 Sep 2010 07:39:14 +0200
Received: from [10.1.10.11] (173-162-214-218-NewEngland.hfc.comcastbusiness.net
	[173.162.214.218])
	by toccata.fugue.com (Postfix) with ESMTPSA id 8958134E539B
	for <libssh2-devel@cool.haxx.se>; Sat, 11 Sep 2010 01:39:29 -0400 (EDT)
Mime-Version: 1.0 (Apple Message framework v1081)
Subject: Re: Key-based authentication with
	libssh2_userauth_publickey_fromfile()
From: Ted Lemon <mellon@fugue.com>
In-Reply-To: <5333D3E9-ED1E-4BBD-847B-7BB1C8A469C5@moontechnolabs.com>
Date: Sat, 11 Sep 2010 01:39:11 -0400
Message-Id: <77E66D56-B513-4EBB-9B86-52E593A56CEF@fugue.com>
References: <6FB7ECA1-626D-4622-BB8A-7D57E86A5150@moontechnolabs.com>
	<91AD0A98-B373-49F7-A018-B4E490969F2C@fugue.com>
	<8B56F4D9-E993-4052-8917-BE7887AC5C87@moontechnolabs.com>
	<8F35CB87-114F-4677-86B0-37DDE4C40996@fugue.com>
	<5333D3E9-ED1E-4BBD-847B-7BB1C8A469C5@moontechnolabs.com>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Mailer: Apple Mail (2.1081)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Sat, 11 Sep 2010 07:39:23 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Sat, 11 Sep 2010 07:39:14 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

It turns out that there's a function that (I think!) will export the key in ssh format for you: SecKeychainItemExport().   I suspect the format you want is kSecFormatSSHv2.  I can't say for sure, though, because I haven't actually tried it.   But I'd give that a shot and see what happens.

In case it isn't already obvious to you, you might also want to follow this advice: http://www.iphonedevsdk.com/forum/iphone-sdk-development/41323-note-about-seckeygeneratepair.html


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

From libssh2-devel-bounces@cool.haxx.se  Sat Sep 11 07:43:10 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8B5h8jt006777;
	Sat, 11 Sep 2010 07:43:10 +0200
Received: from oproxy2-pub.bluehost.com (oproxy2-pub.bluehost.com
	[67.222.39.60])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with SMTP id o8B5h6t0006719
	for <libssh2-devel@cool.haxx.se>; Sat, 11 Sep 2010 07:43:07 +0200
Received: (qmail 32488 invoked by uid 0); 11 Sep 2010 05:43:04 -0000
Received: from unknown (HELO box439.bluehost.com) (69.89.31.239)
	by oproxy2.bluehost.com with SMTP; 11 Sep 2010 05:43:04 -0000
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default;
	d=moontechnolabs.com; 
	h=Received:Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Content-Transfer-Encoding:Message-Id:References:To:X-Mailer:X-Identified-User;
	b=DwpJzU0zKmUMWGn18MFA9Odr7XsdLgIa2abzy17P31HpG4XaRbpxKpdGaiGQrHLJKC95Pcu1g3S+5n6fhij2sJRsTWmhYT/j8/K1CpAfXhZTwRBP19G70jzdGEIJz8+C;
Received: from [122.170.24.41] (helo=[192.168.1.14])
	by box439.bluehost.com with esmtpsa (TLSv1:AES128-SHA:128)
	(Exim 4.69) (envelope-from <paresh.thakor@moontechnolabs.com>)
	id 1OuIrg-0004o1-3f
	for libssh2-devel@cool.haxx.se; Fri, 10 Sep 2010 23:43:04 -0600
Mime-Version: 1.0 (Apple Message framework v1078)
Subject: Re: Key-based authentication with
	libssh2_userauth_publickey_fromfile()
From: Paresh Thakor <paresh.thakor@moontechnolabs.com>
In-Reply-To: <77E66D56-B513-4EBB-9B86-52E593A56CEF@fugue.com>
Date: Sat, 11 Sep 2010 11:12:59 +0530
Message-Id: <D3E5134F-1DE2-4A05-B73D-9291E126169C@moontechnolabs.com>
References: <6FB7ECA1-626D-4622-BB8A-7D57E86A5150@moontechnolabs.com>
	<91AD0A98-B373-49F7-A018-B4E490969F2C@fugue.com>
	<8B56F4D9-E993-4052-8917-BE7887AC5C87@moontechnolabs.com>
	<8F35CB87-114F-4677-86B0-37DDE4C40996@fugue.com>
	<5333D3E9-ED1E-4BBD-847B-7BB1C8A469C5@moontechnolabs.com>
	<77E66D56-B513-4EBB-9B86-52E593A56CEF@fugue.com>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Mailer: Apple Mail (2.1078)
X-Identified-User: {1089:box439.bluehost.com:moonsoft:moontechnolabs.com}
	{sentby:smtp auth 122.170.24.41 authed with
	paresh.thakor@moontechnolabs.com}
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Sat, 11 Sep 2010 07:43:10 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Sat, 11 Sep 2010 07:43:07 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Okay, i'll take a look for these all information you have provided and put my efforts to work over them. Thanks for your help.

Regards,
Paresh Thakor.

On Sep 11, 2010, at 11:09 AM, Ted Lemon wrote:

> It turns out that there's a function that (I think!) will export the key in ssh format for you: SecKeychainItemExport().   I suspect the format you want is kSecFormatSSHv2.  I can't say for sure, though, because I haven't actually tried it.   But I'd give that a shot and see what happens.
> 
> In case it isn't already obvious to you, you might also want to follow this advice: http://www.iphonedevsdk.com/forum/iphone-sdk-development/41323-note-about-seckeygeneratepair.html
> 
> 
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

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

From libssh2-devel-bounces@cool.haxx.se  Sat Sep 11 14:08:02 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8BC7Ifd011486;
	Sat, 11 Sep 2010 14:07:57 +0200
Received: from mail.ritual.org (146.n01.hh.clusters.de [213.238.52.146])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8BC7FJ8011466
	for <libssh2-devel@cool.haxx.se>; Sat, 11 Sep 2010 14:07:16 +0200
Received: from spring.local (spring.ritual.org [217.91.25.149])
	(authenticated bits=0)
	by mail.ritual.org (8.12.9/8.12.9) with ESMTP id o8BC79UF030719
	for <libssh2-devel@cool.haxx.se>; Sat, 11 Sep 2010 14:07:11 +0200
Received: from [IPv6:::1] (localhost [IPv6:::1])
	by spring.local (Postfix) with ESMTP id 663023231FCA
	for <libssh2-devel@cool.haxx.se>; Sat, 11 Sep 2010 14:07:09 +0200 (CEST)
From: Uli Zappe <uli@ritual.org>
Subject: BUG: libssh2_channel_read() does not handle files with size = 0
	correctly
Date: Sat, 11 Sep 2010 14:07:09 +0200
Message-Id: <2E4E2ECE-8ABC-4BBB-8F15-F4949FDEB998@spring.local>
To: libssh2 development <libssh2-devel@cool.haxx.se>
Mime-Version: 1.0 (Apple Message framework v1081)
X-Mailer: Apple Mail (2.1081)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Sat, 11 Sep 2010 14:08:02 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Sat, 11 Sep 2010 14:07:16 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Hi,

there's a bug in libssh2_channel_read() that makes it return LIBSSH2_ERROR_=
EAGAIN instead of 0 when a file of size 0 is to be copied (using the code o=
f the scp_nonblock.c example). As a result, scp times out instead of immedi=
ately returning normally after copying a remote file with size 0. (Lock fil=
es are a real world example of files with size 0.)

In the limited time I had I could not completely figure out what's happenin=
g. If you turn on LIBSSH2_TRACE_SOCKET logging, trying to copy a file of si=
ze 0 results in =


[libssh2] 0.219610 Socket: Sent 23/23 bytes at 0x26415+0
[libssh2] 0.219643 Socket: Error recving 1 bytes to 0xbfff74af: 35
[libssh2] 0.233947 Socket: Recved 1 bytes to 0xbfff74af
[libssh2] 0.233988 Socket: Recved 1 bytes to 0xbfff74af
[libssh2] 0.233995 Socket: Recved 1 bytes to 0xbfff74af
[libssh2] 0.234002 Socket: Recved 1 bytes to 0xbfff74af
[libssh2] 0.234009 Socket: Recved 1 bytes to 0xbfff74af
[libssh2] 0.234016 Socket: Recved 1 bytes to 0xbfff74af
[libssh2] 0.234023 Socket: Recved 1 bytes to 0xbfff74af
[libssh2] 0.234030 Socket: Recved 1 bytes to 0xbfff74af
[libssh2] 0.234037 Socket: Recved 1 bytes to 0xbfff74af
....

and after some time

[libssh2] 0.234328 Socket: Error recving 16384 bytes to 0x80d520+0: 35
[libssh2] 0.238003 Socket: Recved 784/16384 bytes to 0x80d520+0
[libssh2] 0.245598 Socket: Sent 272/272 bytes at 0x10bfa0
[libssh2] 0.245695 Socket: Error recving 16384 bytes to 0x80d520+0: 35
[libssh2] 0.262529 Socket: Recved 848/16384 bytes to 0x80d520+0
[libssh2] 0.271419 Socket: Sent 16/16 bytes at 0x1073a0
[libssh2] 0.271537 Socket: Sent 52/52 bytes at 0x1072e0
[libssh2] 0.271557 Socket: Error recving 16384 bytes to 0x80d520+0: 35
....


I could trace the issue back to _libssh2_transport_read(), lines 375-394 in=
 transport.c (libssh2-1.2.7). After all the looping from above _libssh2_rec=
v() (which is basically simply recv()) is called from within _libssh2_trans=
port_read() with PACKETBUFSIZE =3D 16384 and remainbuf =3D 0 and returns nr=
ead =3D -1 and sets errno to EAGAIN. As a result, transport.c bails out at =
line 394 and returns LIBSSH2_ERROR_EAGAIN.

This leads back to _libssh2_channel_read(), line 1693 in channel.c, from wh=
ich _libssh2_transport_read() was called, and makes this function bail out =
in turn at line 1794, again with LIBSSH2_ERROR_EAGAIN.

This, in turn, finally makes src/scp.c bail out at line 392, with NULL and =
libssh2 error set to LIBSSH2_ERROR_EAGAIN.

So basically, LIBSSH2_ERROR_EAGAIN is propagated upwards from recv(), but I=
 don't really understand what exactly is going on here. But in any case, li=
bssh2_channel_read() must not return LIBSSH2_ERROR_EAGAIN when a file of si=
ze 0 is (successfully!) copied (which of course actually just means that an=
 empty file with the name of the source file is created locally).

            Bye
                    Uli
________________________________________________________

  Uli Zappe, Solmsstra=DFe 5, D-65189 Wiesbaden, Germany
  http://www.ritual.org
  Fon: +49-700-ULIZAPPE
  Fax: +49-700-ZAPPEFAX
________________________________________________________

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

From libssh2-devel-bounces@cool.haxx.se  Sat Sep 11 23:50:07 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8BLnX2V000541;
	Sat, 11 Sep 2010 23:50:02 +0200
Received: from mail.ritual.org (146.n01.hh.clusters.de [213.238.52.146])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8BLnVf5000488
	for <libssh2-devel@cool.haxx.se>; Sat, 11 Sep 2010 23:49:32 +0200
Received: from spring.local (spring.ritual.org [217.91.25.149])
	(authenticated bits=0)
	by mail.ritual.org (8.12.9/8.12.9) with ESMTP id o8BLnRUF002210
	for <libssh2-devel@cool.haxx.se>; Sat, 11 Sep 2010 23:49:27 +0200
Received: from [IPv6:::1] (localhost [IPv6:::1])
	by spring.local (Postfix) with ESMTP id E7A963236294
	for <libssh2-devel@cool.haxx.se>; Sat, 11 Sep 2010 23:49:24 +0200 (CEST)
Mime-Version: 1.0 (Apple Message framework v1081)
Subject: Re: preserving access and modification time
From: Uli Zappe <uli@ritual.org>
In-Reply-To: <BC54DE87-9AF5-4460-83A4-270B4334AF72@spring.local>
Date: Sat, 11 Sep 2010 23:49:24 +0200
Message-Id: <302BE489-0134-4B00-9DAC-EADB5BCD093E@spring.local>
References: <865A2E79-C252-4D0A-BC60-9F95E53BBCF6@spring.local>
	<ACB50331-63F2-49D1-828A-42A2D6080123@spring.local>
	<alpine.DEB.2.00.1009091910420.24402@tvnag.unkk.fr>
	<9CF8070A-C0B8-4C24-9ECF-143656CDF1E8@spring.local>
	<alpine.DEB.2.00.1009100832360.24402@tvnag.unkk.fr>
	<BC54DE87-9AF5-4460-83A4-270B4334AF72@spring.local>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Mailer: Apple Mail (2.1081)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Sat, 11 Sep 2010 23:50:07 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Sat, 11 Sep 2010 23:49:32 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

I wrote:

> Now, of course you would think that the time preserving examples of the l=
inked article would work as well the other way round, i.e. doing something =
like
> =

> $ scp -pt /tmp
> $ T1183832947 0 1183833773 0
> $ C0644 6 test
> $ [content]
> =

> However, this does *not* work
> [...]
> 2. Is this a peculiarity of Mac OS X's version of OpenSSH? =


I have now cross-checked on Linux, and the issue is exactly the same. So un=
less someone here reports differently, I would now assume that setting acce=
ss and modification times on the remote end via scp works for no-one in lib=
ssh2 (or via the shell as shown above).

So the big question is, what is the "mystery meat" in OpenSSH's scp command=
 line utility that makes it successful in setting access and modification t=
imes on the (very same) remote end? As I said, using the verbose option (sc=
p -v) makes it look as if it did exactly the same as libssh2, while obvious=
ly it doesn't.

Very strange.

            Bye
                    Uli
________________________________________________________

  Uli Zappe, Solmsstra=DFe 5, D-65189 Wiesbaden, Germany
  http://www.ritual.org
  Fon: +49-700-ULIZAPPE
  Fax: +49-700-ZAPPEFAX
________________________________________________________

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

From libssh2-devel-bounces@cool.haxx.se  Mon Sep 13 04:13:02 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8D2CdES000788;
	Mon, 13 Sep 2010 04:12:59 +0200
Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com
	[209.85.210.54])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8D2Ca7I000775
	for <libssh2-devel@cool.haxx.se>; Mon, 13 Sep 2010 04:12:37 +0200
Received: by pzk7 with SMTP id 7so2414117pzk.41
	for <libssh2-devel@cool.haxx.se>; Sun, 12 Sep 2010 19:12:31 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:received:received:from:content-type
	:content-transfer-encoding:subject:date:message-id:to:mime-version
	:x-mailer; bh=zmkF02p/uEKV0r7AOqbbuJGMtvV2BXTCKFR1YZGQi1A=;
	b=THplmpVFFCfQOJPzjezFsXX+t36QWXpvACM38w7qaEfKeL1b+zCWbNt+CLFbnZ4U0x
	SCyJeNE2oPBFbIXzG2NqQAx+UPKepihwrQkhnp+yHbxxBkY19BKA5qMHd+/uF/ixw3d0
	b5inEj/LUom7wHaXB4asf9cXBhvKOqdJREsJo=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=from:content-type:content-transfer-encoding:subject:date:message-id
	:to:mime-version:x-mailer;
	b=g8L3o5mnKpO8nvD4sM7zSgEP/5ce21txiRyNAau0+djL4OxBPf5z+1cHR6obvzSvG/
	ynPsjEuumk7BvyRxWN8S6IrtvfotyBastr/U5cO3qSswWHUfzMRs646aSAxO1fdo7WrZ
	Ep8PYeKoJmPHrXtg1ARwJ3i155n3G1QR7FfNw=
Received: by 10.114.124.17 with SMTP id w17mr4741437wac.204.1284343951453;
	Sun, 12 Sep 2010 19:12:31 -0700 (PDT)
Received: from [192.168.1.33] ([58.211.179.146])
	by mx.google.com with ESMTPS id o17sm11016116wal.9.2010.09.12.19.12.29
	(version=TLSv1/SSLv3 cipher=RC4-MD5);
	Sun, 12 Sep 2010 19:12:30 -0700 (PDT)
From: Ryan <wanglun02@gmail.com>
Subject: Does anyone use it for iPhone app dev?
Date: Mon, 13 Sep 2010 10:12:27 +0800
Message-Id: <91B2AA8F-9E56-48C8-AF95-2A7971FF9113@gmail.com>
To: libssh2-devel@cool.haxx.se
Mime-Version: 1.0 (Apple Message framework v1081)
X-Mailer: Apple Mail (2.1081)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Mon, 13 Sep 2010 04:13:02 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Mon, 13 Sep 2010 04:12:38 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Hi all.
NIce to get here
Does anyone know how to build a static library for iPhone dev
I am really in big trouble about it 
I have no idea about port an unix project to an iPhone one
Anyone can give me some Help


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

From libssh2-devel-bounces@cool.haxx.se  Mon Sep 13 07:01:25 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8D516Bm008704;
	Mon, 13 Sep 2010 07:01:22 +0200
Received: from dottedmag.net (mail.dottedmag.net [78.46.75.124])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8D514wQ008649
	for <libssh2-devel@cool.haxx.se>; Mon, 13 Sep 2010 07:01:05 +0200
Received: from leibnitz.dottedmag.net (l49-131-243.cn.ru [178.49.131.243])
	by dottedmag.net (Postfix) with ESMTPSA id BAFCE34610A
	for <libssh2-devel@cool.haxx.se>; Mon, 13 Sep 2010 09:01:03 +0400 (MSD)
Received: from dottedmag by leibnitz.dottedmag.net with local (Exim 4.72)
	(envelope-from <dottedmag@leibnitz.dottedmag.net>)
	id 1Ov1A5-0003oO-5j
	for libssh2-devel@cool.haxx.se; Mon, 13 Sep 2010 12:01:01 +0700
From: Mikhail Gusarov <dottedmag@dottedmag.net>
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: Does anyone use it for iPhone app dev?
References: <91B2AA8F-9E56-48C8-AF95-2A7971FF9113@gmail.com>
Date: Mon, 13 Sep 2010 12:01:00 +0700
In-Reply-To: <91B2AA8F-9E56-48C8-AF95-2A7971FF9113@gmail.com> (Ryan's message
	of "Mon, 13 Sep 2010 10:12:27 +0800")
Message-ID: <87mxrm8cfn.fsf@leibnitz.dottedmag.net>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)
MIME-Version: 1.0
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Mon, 13 Sep 2010 07:01:25 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Mon, 13 Sep 2010 07:01:05 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0193965870=="
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

--===============0193965870==
Content-Type: multipart/signed; boundary="=-=-=";
	micalg=pgp-sha1; protocol="application/pgp-signature"

--=-=-=
Content-Transfer-Encoding: quoted-printable


Twas brillig at 10:12:27 13.09.2010 UTC+08 when wanglun02@gmail.com did gyr=
e and gimble:

 R> Does anyone know how to build a static library for iPhone dev
 R> I am really in big trouble about it=20
 R> I have no idea about port an unix project to an iPhone one
 R> Anyone can give me some Help

Please refer to the iPhone development mailing lists.

=2D-=20
  http://fossarchy.blogspot.com/

--=-=-=
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iQIcBAEBAgAGBQJMjbAMAAoJEJ0g9lA+M4iIwlAQANgWmiTZFgVvK2x7RHz8RClb
o4pbupK03Dr8QhwF5z0cmPaYSg9XMUAg13Arb4eM/kcGo8lVvupY1E2SG8okmAwX
asVMy9YCD0P/4U7OelRxAVzovl17lE9xrb1WeIcf+8R5AjcpvL4UwcP6PSQwII5u
bcsPNTm22cB1BMiKc76kXYQG9W6BypKsCEc+1izIXKYB+3mpkFs4/hR1ceiO9X1F
282XQihwgYqm8joFVVtyzNhaxsVQSj7ArK2TLigPPEoC5sCuLy+dAqaprHHo2E4X
qHNBKq6YihckxshvEyi53tMRfIOPPenWlgoKT+dn5deM17g3xx19TkJqcmDUuojm
kAs6Cj/GLyOZBGV1KImAoePcJrInmihbnj2AkMLYTziNNTtRG7ndZb0fUBAFHZ8k
Ma+ykCfJ6mE+ROMv8fgZojxfUYVSs7m4QZmUza1H8EUCXt0EhICoCKNBLBjHrLOY
dWfbgeDBu+9mULrESM0EcN1GncQ4FpvKJH7OutLYqTWJRiZXJ6bSk2TVCZCePdFy
aTafwPKJYQVjzA6E5jO3T97O3fEFx9NYcIFl3YIHUy2Y6T5rPb3Kcd2MiKvcAX7l
kUlxaEtABIEMYzbUusCJ8rW/1bc7doy/dw0C/qiv8C9B/HYdlhFQI4WH8QBAHxMh
LtpfL0+WmdJ+cidQ13Wx
=wbzn
-----END PGP SIGNATURE-----
--=-=-=--

--===============0193965870==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============0193965870==--

From libssh2-devel-bounces@cool.haxx.se  Tue Sep 14 09:13:26 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8E7D3DM031694;
	Tue, 14 Sep 2010 09:13:21 +0200
Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.22])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with SMTP id o8E7D1hn031624
	for <libssh2-devel@cool.haxx.se>; Tue, 14 Sep 2010 09:13:01 +0200
Received: (qmail invoked by alias); 14 Sep 2010 07:12:55 -0000
Received: from adsl-84-227-27-59.adslplus.ch (EHLO [192.168.1.64])
	[84.227.27.59]
	by mail.gmx.net (mp058) with SMTP; 14 Sep 2010 09:12:55 +0200
X-Authenticated: #1568940
X-Provags-ID: V01U2FsdGVkX18olvV9AoAoPuJmRDl87op774gOA7O9me/0wA/ikm
	v+11RAMtM70/p3
Message-ID: <4C8F2076.4080004@gmx.at>
Date: Tue, 14 Sep 2010 09:12:54 +0200
From: double <ninive@gmx.at>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.9.1.12) Gecko/20100826 Thunderbird/3.0.7
MIME-Version: 1.0
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Change working directory
X-Y-GMX-Trusted: 0
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Tue, 14 Sep 2010 09:13:26 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Tue, 14 Sep 2010 09:13:01 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Hi,

Is there a chance to change the working directory
before calling `libssh2_channel_exec()`?

Thanks
Marcus
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Tue Sep 14 09:35:17 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8E7Z799014811;
	Tue, 14 Sep 2010 09:35:16 +0200
Received: from oproxy3-pub.bluehost.com (oproxy3-pub.bluehost.com [69.89.21.8])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with SMTP id o8E7Z4sP014676
	for <libssh2-devel@cool.haxx.se>; Tue, 14 Sep 2010 09:35:05 +0200
Received: (qmail 7210 invoked by uid 0); 14 Sep 2010 07:35:01 -0000
Received: from unknown (HELO box439.bluehost.com) (69.89.31.239)
	by oproxy3.bluehost.com with SMTP; 14 Sep 2010 07:35:01 -0000
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default;
	d=moontechnolabs.com; 
	h=Received:Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Content-Transfer-Encoding:Message-Id:References:To:X-Mailer:X-Identified-User;
	b=eo8j5WhjmUT32845gggW5gqeQji0amvU+RIYtKx5LC8rSYDT9++9I7UImrvY/aHU3FKF20cJNRrOie7cY4iclTguiSaDoDQNCH9GoZ+jfRYIJmHlHfPII6Pwq4zQpgQI;
Received: from [122.170.46.97] (helo=[192.168.1.14])
	by box439.bluehost.com with esmtpsa (TLSv1:AES128-SHA:128)
	(Exim 4.69) (envelope-from <paresh.thakor@moontechnolabs.com>)
	id 1OvQ2f-0006XZ-CI
	for libssh2-devel@cool.haxx.se; Tue, 14 Sep 2010 01:35:01 -0600
Mime-Version: 1.0 (Apple Message framework v1078)
Subject: Re: Change working directory
From: Paresh Thakor <paresh.thakor@moontechnolabs.com>
In-Reply-To: <4C8F2076.4080004@gmx.at>
Date: Tue, 14 Sep 2010 13:04:56 +0530
Message-Id: <AE09EA71-2C82-4442-BA8A-60D75C266B7C@moontechnolabs.com>
References: <4C8F2076.4080004@gmx.at>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Mailer: Apple Mail (2.1078)
X-Identified-User: {1089:box439.bluehost.com:moonsoft:moontechnolabs.com}
	{sentby:smtp auth 122.170.46.97 authed with
	paresh.thakor@moontechnolabs.com}
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Tue, 14 Sep 2010 09:35:17 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Tue, 14 Sep 2010 09:35:06 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se


Please understand about libssh2_channels, you'll get idea how libssh2 works. channel_exec() is to execute commands, and CHANNEL is like virtual terminal, your all contents and history will be on CHANNEL, so, if you have executed CD command, then it'll change directory on channel, so, next command execution using EXEC follows the above directory change.

On Sep 14, 2010, at 12:42 PM, double wrote:

> Hi,
> 
> Is there a chance to change the working directory
> before calling `libssh2_channel_exec()`?
> 
> Thanks
> Marcus
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

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

From libssh2-devel-bounces@cool.haxx.se  Tue Sep 14 10:23:14 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8E8MwSF020313;
	Tue, 14 Sep 2010 10:23:13 +0200
Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.22])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with SMTP id o8E8Mu6F020135
	for <libssh2-devel@cool.haxx.se>; Tue, 14 Sep 2010 10:22:56 +0200
Received: (qmail invoked by alias); 14 Sep 2010 08:22:49 -0000
Received: from adsl-84-227-27-59.adslplus.ch (EHLO [192.168.1.64])
	[84.227.27.59]
	by mail.gmx.net (mp006) with SMTP; 14 Sep 2010 10:22:49 +0200
X-Authenticated: #1568940
X-Provags-ID: V01U2FsdGVkX18WLgUrTA0WSub5lAIf2QETu9BiB7aU83x70DG95Z
	Z85+OJ8BMNiYLQ
Message-ID: <4C8F30D8.1000808@gmx.at>
Date: Tue, 14 Sep 2010 10:22:48 +0200
From: double <ninive@gmx.at>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.9.1.12) Gecko/20100826 Thunderbird/3.0.7
MIME-Version: 1.0
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: Change working directory
References: <4C8F2076.4080004@gmx.at>
	<AE09EA71-2C82-4442-BA8A-60D75C266B7C@moontechnolabs.com>
In-Reply-To: <AE09EA71-2C82-4442-BA8A-60D75C266B7C@moontechnolabs.com>
X-Y-GMX-Trusted: 0
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Tue, 14 Sep 2010 10:23:14 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Tue, 14 Sep 2010 10:22:56 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Am 14.09.2010 09:34, schrieb Paresh Thakor:
> if you have executed CD command, then it'll change directory on channel,
> so, next command execution using EXEC follows the above directory change.
>    

Hi Paresh,

This is also what I thought about. The problem:

1.    libssh2_channel_open_session()
2.    libssh2_channel_exec( "cd /workingdir" );
3.    libssh2_channel_close()
4.    libssh2_channel_wait_closed()
5.    libssh2_channel_get_exit_status()

Now I can see, if "cd /workingdir" returned "0", but
the channel is closed.

As far as I understand, `libssh2_channel_get_exit_status()`
works only on closed channels.

Thanks
Marcus
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Tue Sep 14 10:43:15 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8E8hBDC032435;
	Tue, 14 Sep 2010 10:43:14 +0200
Received: from mail.ritual.org (146.n01.hh.clusters.de [213.238.52.146])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8E8h8ev032376
	for <libssh2-devel@cool.haxx.se>; Tue, 14 Sep 2010 10:43:09 +0200
Received: from spring.local (spring.ritual.org [217.91.25.149])
	(authenticated bits=0)
	by mail.ritual.org (8.12.9/8.12.9) with ESMTP id o8E8h7UF020789
	for <libssh2-devel@cool.haxx.se>; Tue, 14 Sep 2010 10:43:07 +0200
Received: from [IPv6:::1] (localhost [IPv6:::1])
	by spring.local (Postfix) with ESMTP id 64F40323DB61
	for <libssh2-devel@cool.haxx.se>; Tue, 14 Sep 2010 10:43:06 +0200 (CEST)
Mime-Version: 1.0 (Apple Message framework v1081)
Subject: Re: Change working directory
From: Uli Zappe <uli@ritual.org>
In-Reply-To: <4C8F30D8.1000808@gmx.at>
Date: Tue, 14 Sep 2010 10:43:05 +0200
Message-Id: <EF78316E-85C3-42E5-8FF0-6A131BED874F@spring.local>
References: <4C8F2076.4080004@gmx.at>
	<AE09EA71-2C82-4442-BA8A-60D75C266B7C@moontechnolabs.com>
	<4C8F30D8.1000808@gmx.at>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Mailer: Apple Mail (2.1081)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Tue, 14 Sep 2010 10:43:15 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Tue, 14 Sep 2010 10:43:09 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Am 14.09.2010 um 10:22 schrieb double:

> This is also what I thought about. The problem:
> =

> 1.    libssh2_channel_open_session()
> 2.    libssh2_channel_exec( "cd /workingdir" );
> 3.    libssh2_channel_close()
> 4.    libssh2_channel_wait_closed()
> 5.    libssh2_channel_get_exit_status()
> =

> Now I can see, if "cd /workingdir" returned "0", but the channel is close=
d.

Why don't you do the error checking within the script you're going to execu=
te?

i.e. libssh2_channel_exec( "if cd /workingdir; then continue; else echo fai=
lure; exit; fi" );


            Bye
                    Uli
________________________________________________________

  Uli Zappe, Solmsstra=DFe 5, D-65189 Wiesbaden, Germany
  http://www.ritual.org
  Fon: +49-700-ULIZAPPE
  Fax: +49-700-ZAPPEFAX
________________________________________________________

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

From libssh2-devel-bounces@cool.haxx.se  Tue Sep 14 10:52:51 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8E8qjh4005814;
	Tue, 14 Sep 2010 10:52:51 +0200
Received: from oproxy2-pub.bluehost.com (oproxy2-pub.bluehost.com
	[67.222.39.60])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with SMTP id o8E8qhDT005806
	for <libssh2-devel@cool.haxx.se>; Tue, 14 Sep 2010 10:52:44 +0200
Received: (qmail 23217 invoked by uid 0); 14 Sep 2010 08:52:41 -0000
Received: from unknown (HELO box439.bluehost.com) (69.89.31.239)
	by oproxy2.bluehost.com with SMTP; 14 Sep 2010 08:52:41 -0000
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default;
	d=moontechnolabs.com; 
	h=Received:Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Content-Transfer-Encoding:Message-Id:References:To:X-Mailer:X-Identified-User;
	b=wiA65dHKC8Ke8MFSfDjm+O5LywzQshrrg1ck54ZVhEtrWt47N7xKldhfKm2qP9XzMUd0g3THJA1tj2i0FDKSDAj5SPxbRuxf6eVt4fWHQc9rAnJzA9iuawXCebaFhoAp;
Received: from [122.170.46.97] (helo=[192.168.1.14])
	by box439.bluehost.com with esmtpsa (TLSv1:AES128-SHA:128)
	(Exim 4.69) (envelope-from <paresh.thakor@moontechnolabs.com>)
	id 1OvRFo-0003j1-6s
	for libssh2-devel@cool.haxx.se; Tue, 14 Sep 2010 02:52:40 -0600
Mime-Version: 1.0 (Apple Message framework v1078)
Subject: Re: Change working directory
From: Paresh Thakor <paresh.thakor@moontechnolabs.com>
In-Reply-To: <EF78316E-85C3-42E5-8FF0-6A131BED874F@spring.local>
Date: Tue, 14 Sep 2010 14:22:35 +0530
Message-Id: <DE99ADCC-EA6C-4703-83C7-3BD9A9DA04A0@moontechnolabs.com>
References: <4C8F2076.4080004@gmx.at>
	<AE09EA71-2C82-4442-BA8A-60D75C266B7C@moontechnolabs.com>
	<4C8F30D8.1000808@gmx.at>
	<EF78316E-85C3-42E5-8FF0-6A131BED874F@spring.local>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Mailer: Apple Mail (2.1078)
X-Identified-User: {1089:box439.bluehost.com:moonsoft:moontechnolabs.com}
	{sentby:smtp auth 122.170.46.97 authed with
	paresh.thakor@moontechnolabs.com}
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Tue, 14 Sep 2010 10:52:51 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Tue, 14 Sep 2010 10:52:44 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

But do exit when you have completed with libssh2, else let is be in open mo=
de. Otherwise commands will not work.
On Sep 14, 2010, at 2:13 PM, Uli Zappe wrote:

> Am 14.09.2010 um 10:22 schrieb double:
> =

>> This is also what I thought about. The problem:
>> =

>> 1.    libssh2_channel_open_session()
>> 2.    libssh2_channel_exec( "cd /workingdir" );
>> 3.    libssh2_channel_close()
>> 4.    libssh2_channel_wait_closed()
>> 5.    libssh2_channel_get_exit_status()
>> =

>> Now I can see, if "cd /workingdir" returned "0", but the channel is clos=
ed.
> =

> Why don't you do the error checking within the script you're going to exe=
cute?
> =

> i.e. libssh2_channel_exec( "if cd /workingdir; then continue; else echo f=
ailure; exit; fi" );
> =

> =

>            Bye
>                    Uli
> ________________________________________________________
> =

>  Uli Zappe, Solmsstra=DFe 5, D-65189 Wiesbaden, Germany
>  http://www.ritual.org
>  Fon: +49-700-ULIZAPPE
>  Fax: +49-700-ZAPPEFAX
> ________________________________________________________
> =

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

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

From libssh2-devel-bounces@cool.haxx.se  Tue Sep 14 10:59:41 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8E8xZ2N007873;
	Tue, 14 Sep 2010 10:59:40 +0200
Received: from mail.ritual.org (146.n01.hh.clusters.de [213.238.52.146])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8E8xXRs007870
	for <libssh2-devel@cool.haxx.se>; Tue, 14 Sep 2010 10:59:33 +0200
Received: from spring.local (spring.ritual.org [217.91.25.149])
	(authenticated bits=0)
	by mail.ritual.org (8.12.9/8.12.9) with ESMTP id o8E8xXUF020876
	for <libssh2-devel@cool.haxx.se>; Tue, 14 Sep 2010 10:59:33 +0200
Received: from [IPv6:::1] (localhost [IPv6:::1])
	by spring.local (Postfix) with ESMTP id BEBE7323DCC3
	for <libssh2-devel@cool.haxx.se>; Tue, 14 Sep 2010 10:59:32 +0200 (CEST)
Mime-Version: 1.0 (Apple Message framework v1081)
Subject: Re: Change working directory
From: Uli Zappe <uli@ritual.org>
In-Reply-To: <DE99ADCC-EA6C-4703-83C7-3BD9A9DA04A0@moontechnolabs.com>
Date: Tue, 14 Sep 2010 10:59:32 +0200
Message-Id: <385E685B-D8C1-421D-A9B8-5078B20572D4@spring.local>
References: <4C8F2076.4080004@gmx.at>
	<AE09EA71-2C82-4442-BA8A-60D75C266B7C@moontechnolabs.com>
	<4C8F30D8.1000808@gmx.at>
	<EF78316E-85C3-42E5-8FF0-6A131BED874F@spring.local>
	<DE99ADCC-EA6C-4703-83C7-3BD9A9DA04A0@moontechnolabs.com>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Mailer: Apple Mail (2.1081)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Tue, 14 Sep 2010 10:59:41 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Tue, 14 Sep 2010 10:59:34 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Am 14.09.2010 um 10:52 schrieb Paresh Thakor:

> But do exit when you have completed with libssh2, else let is be in open =
mode. Otherwise commands will not work.

The "exit" in my code snipped just finishes execution of the script. Of cou=
rse, you have to do proper cleanup for libssh2 afterwards.

            Bye
                    Uli
________________________________________________________

  Uli Zappe, Solmsstra=DFe 5, D-65189 Wiesbaden, Germany
  http://www.ritual.org
  Fon: +49-700-ULIZAPPE
  Fax: +49-700-ZAPPEFAX
________________________________________________________

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

From libssh2-devel-bounces@cool.haxx.se  Wed Sep 15 14:42:13 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8FCfnBR012564;
	Wed, 15 Sep 2010 14:42:09 +0200
Received: from oproxy3-pub.bluehost.com (oproxy3-pub.bluehost.com [69.89.21.8])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with SMTP id o8FCfkks012551
	for <libssh2-devel@cool.haxx.se>; Wed, 15 Sep 2010 14:41:47 +0200
Received: (qmail 16924 invoked by uid 0); 15 Sep 2010 12:41:43 -0000
Received: from unknown (HELO box439.bluehost.com) (69.89.31.239)
	by oproxy3.bluehost.com with SMTP; 15 Sep 2010 12:41:43 -0000
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default;
	d=moontechnolabs.com; 
	h=Received:From:Content-Type:Content-Transfer-Encoding:Subject:Date:Message-Id:To:Mime-Version:X-Mailer:X-Identified-User;
	b=LIkkGZ/gGeGI4ZL+/PK3oQDQTNz1ct1QbiTzNB9tg/jDmbScViHMwb2aY1eE7xxlCFW+xS0A1d+LGFhkzLcDpVVXA/3+1v6/PHF6XHPI/G+Sg8pLKl0voTNZjVphOZWk;
Received: from [122.170.28.149] (helo=[192.168.1.14])
	by box439.bluehost.com with esmtpsa (TLSv1:AES128-SHA:128)
	(Exim 4.69) (envelope-from <paresh.thakor@moontechnolabs.com>)
	id 1OvrJ1-0008Ja-32
	for libssh2-devel@cool.haxx.se; Wed, 15 Sep 2010 06:41:43 -0600
From: Paresh Thakor <paresh.thakor@moontechnolabs.com>
Subject: libssh2_channel_request_pty()
Date: Wed, 15 Sep 2010 18:11:33 +0530
Message-Id: <CFDA0E38-37DF-4894-BEAF-089342DCAA1B@moontechnolabs.com>
To: libssh2 development <libssh2-devel@cool.haxx.se>
Mime-Version: 1.0 (Apple Message framework v1078)
X-Mailer: Apple Mail (2.1078)
X-Identified-User: {1089:box439.bluehost.com:moonsoft:moontechnolabs.com}
	{sentby:smtp auth 122.170.28.149 authed with
	paresh.thakor@moontechnolabs.com}
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Wed, 15 Sep 2010 14:42:13 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Wed, 15 Sep 2010 14:41:48 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

libssh2_channel_request_pty() requires terminal type, "vanilla", "vt100", "xterm", etc. Can anyone let me know what other types can be supported by this? Any what other possible values we can use? If there're any reference, let me know. I've tried with few pty types.

Regards,
Paresh Thakor.
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Thu Sep 16 11:53:53 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8G9rDv1029776;
	Thu, 16 Sep 2010 11:53:50 +0200
Received: from mail.gmx.net (mailout-de.gmx.net [213.165.64.23])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with SMTP id o8G9rB4q029762
	for <libssh2-devel@cool.haxx.se>; Thu, 16 Sep 2010 11:53:12 +0200
Received: (qmail invoked by alias); 16 Sep 2010 09:53:05 -0000
Received: from adsl-84-227-27-59.adslplus.ch (EHLO [192.168.1.64])
	[84.227.27.59]
	by mail.gmx.net (mp069) with SMTP; 16 Sep 2010 11:53:05 +0200
X-Authenticated: #1568940
X-Provags-ID: V01U2FsdGVkX1/HBkpulKHHNslgLY6mYaqI23K8JJbPh62+JWAoO4
	IspvAZAIuRWvPn
Message-ID: <4C91E8FD.7040107@gmx.at>
Date: Thu, 16 Sep 2010 11:53:01 +0200
From: double <ninive@gmx.at>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;
	rv:1.9.1.12) Gecko/20100826 Thunderbird/3.0.7
MIME-Version: 1.0
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Buffersize bigger than 1024
Content-Type: multipart/mixed; boundary="------------050205080904060909070001"
X-Y-GMX-Trusted: 0
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Thu, 16 Sep 2010 11:53:53 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Thu, 16 Sep 2010 11:53:12 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

This is a multi-part message in MIME format.
--------------050205080904060909070001
Content-Type: multipart/alternative;
 boundary="------------090305020308050006030700"


--------------090305020308050006030700
Content-Type: text/plain; charset=ISO-8859-15; format=flowed
Content-Transfer-Encoding: 7bit

Hello,

To use a buffer-size bigger than 1024 byte still
has some issues. The attached testcase works
perfectly, if the buffersize is 1024, otherwise it
won't.

Thanks a lot
Marcus


--------------090305020308050006030700
Content-Type: text/html; charset=ISO-8859-15
Content-Transfer-Encoding: 7bit

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
</head>
<body text="#000000" bgcolor="#ffffff">
<div class="moz-text-flowed"
 style="font-family: -moz-fixed; font-size: 12px;" lang="x-western">Hello,
<br>
<br>
To use a buffer-size bigger than 1024 byte still
<br>
has some issues. The attached testcase works
<br>
perfectly, if the buffersize is 1024, otherwise it
<br>
won't.<br>
<br>
Thanks a lot
<br>
Marcus
<br>
</div>
<pre>
</pre>
</body>
</html>

--------------090305020308050006030700--

--------------050205080904060909070001
Content-Type: text/x-c++src;
 name="timeout.cpp"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment;
 filename="timeout.cpp"

#include <sys/types.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <sys/select.h>
#include <netdb.h>
#include <fcntl.h>
#include <errno.h>
#include <malloc.h>
#include <alloca.h>
#include <stdlib.h>

#include <libssh2.h>
#include <libssh2_sftp.h>

#define SOCKET_TIMEOUT      60

// Buffersize - sftp bug in libssh2 1.0 und 1.2
#if LIBSSH2_VERSION_MAJOR == 0
#define LIBSSH2_BUFFERSIZE      65536
#else
//#define LIBSSH2_BUFFERSIZE      1024
#define LIBSSH2_BUFFERSIZE      32500
#endif


struct Connection
{
    int sock;
    LIBSSH2_SESSION *ssh2;
    LIBSSH2_SFTP *sftp;
};
static bool socket_connect( const char *remote_host, int remote_port, int &sock );
static void socket_disconnect( int sock );
static bool socket_select( int sock, LIBSSH2_SESSION *session );    // session == NULL -> writing
static Connection* ssh2_connect( const char *remote_host, int remote_port, const char *username, const char *password );
static Connection* sftp_connect( const char *remote_host, int remote_port, const char *username, const char *password );
static void ssh2_disconnect( Connection *connection );

bool sftp_put_file( const Connection *connection, const char *local_filename, const char *target_filename );


int main(int argc, char *argv[])
{
    Connection *connection = sftp_connect( "www.youserver.com", 22, "XXXX", "abcdef" );
    if( connection == NULL )
        return 1;
    bool status = sftp_put_file( connection, "/tmp/bigger-than-buffer", "/tmp/hugo2" );
    ssh2_disconnect( connection );
    printf( status ? "Worked\n" : "Didn't work\n" );
    return 0;
}



bool sftp_put_file( const Connection *connection, const char *local_filename, const char *target_filename )
{
    LIBSSH2_SFTP_HANDLE *sftp_handle;
    while( (sftp_handle = libssh2_sftp_open(connection->sftp, target_filename, LIBSSH2_FXF_WRITE|LIBSSH2_FXF_CREAT|LIBSSH2_FXF_TRUNC, 0644)) == NULL &&
           libssh2_session_last_error(connection->ssh2,NULL,NULL,0) == LIBSSH2_ERROR_EAGAIN )
    {
        if( ! socket_select(connection->sock,connection->ssh2) )
            break;
    }
    FILE *file = fopen( local_filename, "rb" );
    if( file == NULL )
    {
        int rc;
        while( (rc = libssh2_sftp_close(sftp_handle)) == LIBSSH2_ERROR_EAGAIN )
        {
            if( ! socket_select(connection->sock,connection->ssh2) )
                break;
        }
        return false;
    }
    bool transfer_error = false;
    for( ;; )
    {
        char buffer[LIBSSH2_BUFFERSIZE];
        int nread = fread( buffer, 1, sizeof(buffer), file );
        if( nread <= 0 )
            break;
        char *ptr = buffer;
        int nwrite = nread;
        for( ;; )
        {
            // write data in a loop until we block
            int rc;
            while( (rc = libssh2_sftp_write(sftp_handle, ptr, nread)) == LIBSSH2_ERROR_EAGAIN )
            {
                // HERE IT TIMED OUT!
                if( ! socket_select(connection->sock,connection->ssh2) )
                    break;
            }
            if( rc <= 0 )
            {
                transfer_error = true;
                break;
            }
            ptr += rc;
            nwrite -= rc;
            if( nwrite == 0 )
                break;
        }
        if( transfer_error )
            break;
    }
    int rc;
    while( (rc = libssh2_sftp_close(sftp_handle)) == LIBSSH2_ERROR_EAGAIN )
    {
        // HERE IT TIMED OUT!
        if( ! socket_select(connection->sock,connection->ssh2) )
            break;
    }
    fclose( file );
    if( transfer_error )
        return false;
    return true;
}



static bool socket_connect( const char *remote_host, int remote_port, int &sock )
{
    // IP-Adresse ermitteln (zuerst IPv6 versuchen)
    struct hostent *host_addr = NULL;
    {
        host_addr = gethostbyname( remote_host );
        if( host_addr == NULL )
            return false;
    }
    if( host_addr->h_addrtype != AF_INET )
        return false;

    // Port ermitteln
    uint16_t host_port;
    if( remote_port == 0 || remote_port == -1 )
    {
        struct servent *serv = getservbyname( "ssh", "tcp" );
        if( serv )
            host_port = serv->s_port;
        else
            host_port = htons( (unsigned short)22 );
    }
    else
        host_port = htons( (unsigned short)remote_port );

    // Internet-Adresse erzeugen
    struct sockaddr_in addr4;
    addr4.sin_family = AF_INET;
    addr4.sin_port = host_port;
    memcpy( &addr4.sin_addr, host_addr->h_addr_list[0],  host_addr->h_length);

    // Socket erstellen
    sock = socket( AF_INET, SOCK_STREAM, 0 );
    if( sock == -1 )
        return false;

    // Verbinden mit einem nicht blockierenden Socket (Timeout)
    fcntl( sock, F_SETFL, fcntl(sock, F_GETFL) | O_NONBLOCK );

    // Verbinden, schlÃ¤gt fehl, da Socket sonst blockieren wÃ¼rde
    int status;
        status = connect( sock, (const struct sockaddr*)&addr4, sizeof(addr4) );
    if( status == -1 )
    {
        if( errno != EINPROGRESS && errno != EINTR )
        {
            socket_disconnect( sock );
            return false;
        }
    }
    // Warten, bis die Verbindung fertig ist
    if( ! socket_select(sock,NULL) )
        return false;
    return true;
}
static void socket_disconnect( int sock )
{
    close( sock );
}
static bool socket_select( int sock, LIBSSH2_SESSION *session )
{
    bool read = false;
    if( session != NULL )
    {
        // now make sure we wait in the correct direction
        int direction = libssh2_session_block_directions( session );
        if( direction & LIBSSH2_SESSION_BLOCK_INBOUND )
            read = true;
        else if( direction & LIBSSH2_SESSION_BLOCK_OUTBOUND )
            read = false;
    }

    // Nun select aufrufen; entweder timeout oder erfolgreich verbunden
    fd_set fds;
    FD_ZERO( &fds );
    FD_SET( sock, &fds );

    struct timeval timeout;
    timeout.tv_sec = SOCKET_TIMEOUT;
    timeout.tv_usec = 0;

    int status = read ? select(sock + 1, &fds, NULL, NULL, &timeout) :
                        select(sock + 1, NULL, &fds, NULL, &timeout);
    if( status == -1 )
        return false;
    if( FD_ISSET(sock, &fds) == 0 )         // Timeout
        return false;
    return true;
}

static Connection* ssh2_connect( const char *remote_host, int remote_port, const char *username, const char *password )
{
    int sock;
    if( ! socket_connect(remote_host, remote_port, sock) )
        return NULL;

    // Create a session instance
    LIBSSH2_SESSION *session = libssh2_session_init();
    if( ! session )
        goto ssh2_connect_return;

    // Since we have set non-blocking, tell libssh2 we are non-blocking
    libssh2_session_set_blocking( session, 0 );

    // Start up session, this will trade welcome banners, exchange keys, and setup crypto, compression, and MAC layers
    int rc;
    while( (rc = libssh2_session_startup(session, sock)) == LIBSSH2_ERROR_EAGAIN )
    {
        if( ! socket_select(sock,NULL) )
            break;
    }
    if( rc != 0 )
        goto ssh2_connect_return;

    // At this point we havn't authenticated, the first thing to do is check the hostkey's fingerprint against our known hosts
    const char *fp;
    while( (fp = libssh2_hostkey_hash(session, LIBSSH2_HOSTKEY_HASH_MD5)) == NULL &&
           libssh2_session_last_error(session,NULL,NULL,0) == LIBSSH2_ERROR_EAGAIN )
    {
        if( ! socket_select(sock,NULL) )        // must wait for writing, maybe busy waiting (what should I do...)
            break;
    }

    // check what authentication methods are available
    const char *userauthlist;
    while( (userauthlist = libssh2_userauth_list(session, username, strlen(username))) == NULL &&
           libssh2_session_last_error(session,NULL,NULL,0) == LIBSSH2_ERROR_EAGAIN )
    {
        if( ! socket_select(sock,NULL) )        // must wait for writing, maybe busy waiting (what should I do...)
            break;
    }
    if( userauthlist == NULL )
        userauthlist = "";
    // Authenticate via password
    while( (rc = libssh2_userauth_password(session, username, password)) == LIBSSH2_ERROR_EAGAIN )
    {
        if( ! socket_select(sock,NULL) )        // must wait for writing, maybe busy waiting (what should I do...)
            break;
    }
    if( rc != 0 )
        goto ssh2_connect_return;

    static Connection connection;
    connection.sock = sock;
    connection.ssh2 = session;
    connection.sftp = NULL;
    return &connection;

    // Error-Handling:
    ssh2_connect_return:

    if( session )
    {
        while( libssh2_session_disconnect(session, "Normal shutdown, thank you for playing") == LIBSSH2_ERROR_EAGAIN )
        {
            if( ! socket_select(sock,NULL) )        // must wait for writing, maybe busy waiting (what should I do...)
                break;
        }
        libssh2_session_free( session );
    }
    socket_disconnect( sock );
    return NULL;
}
static Connection* sftp_connect( const char *remote_host, int remote_port, const char *username, const char *password )
{
    Connection *connection = ssh2_connect( remote_host, remote_port, username, password );
    if( connection == NULL )
        return NULL;
    LIBSSH2_SFTP *sftp_session;
    while( (sftp_session = libssh2_sftp_init(connection->ssh2)) == NULL &&
           libssh2_session_last_error(connection->ssh2,NULL,NULL,0) == LIBSSH2_ERROR_EAGAIN )
    {
        if( ! socket_select(connection->sock,connection->ssh2) )
            break;
    }
    if( ! sftp_session )
    {
        ssh2_disconnect( connection );
        return NULL;
    }
    connection->sftp = sftp_session;
    return connection;
}
static void ssh2_disconnect( Connection *connection )
{
    if( connection->sftp != NULL )
    {
        while( libssh2_sftp_shutdown(connection->sftp) == LIBSSH2_ERROR_EAGAIN )
        {
            if( ! socket_select(connection->sock,connection->ssh2) )
                break;
        }
    }
    while( libssh2_session_disconnect(connection->ssh2, "Normal shutdown, thank you for playing") == LIBSSH2_ERROR_EAGAIN )
    {
        if( ! socket_select(connection->sock,connection->ssh2) )
            break;
    }
    libssh2_session_free( connection->ssh2 );
    socket_disconnect( connection->sock );
}





--------------050205080904060909070001
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--------------050205080904060909070001--

From libssh2-devel-bounces@cool.haxx.se  Fri Sep 17 16:10:04 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8HE9aVa022507;
	Fri, 17 Sep 2010 16:09:57 +0200
Received: from fep19.mx.upcmail.net (fep19.mx.upcmail.net [62.179.121.39])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8HE9XkL022490
	for <libssh2-devel@cool.haxx.se>; Fri, 17 Sep 2010 16:09:33 +0200
Received: from edge05.upcmail.net ([192.168.13.212]) by viefep19-int.chello.at
	(InterMail vM.8.01.02.02 201-2260-120-106-20100312) with ESMTP
	id <20100917140926.TWKM1892.viefep19-int.chello.at@edge05.upcmail.net>
	for <libssh2-devel@cool.haxx.se>; Fri, 17 Sep 2010 16:09:26 +0200
Received: from lexx.office.loytec.com ([212.17.98.150])
	by edge05.upcmail.net with edge
	id 7q9Q1f02U3EgbyC05q9RUl; Fri, 17 Sep 2010 16:09:26 +0200
X-SourceIP: 212.17.98.150
Received: from office.loytec.com (diamond.office.loytec.com [10.101.17.6])
	by lexx.office.loytec.com (8.14.3/8.14.3/Some OS 1.2.3-4.5) with ESMTP
	id o8HE9OIJ018262
	for <libssh2-devel@cool.haxx.se>; Fri, 17 Sep 2010 16:09:24 +0200
X-MimeOLE: Produced By Microsoft Exchange V6.5
Content-class: urn:content-classes:message
MIME-Version: 1.0
Subject: Packet drop on full socket problem
Date: Fri, 17 Sep 2010 16:09:23 +0200
Message-ID: <2A05B543BABBE34893295B03A215B9E0011757A8@diamond.office.loytec.com>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Packet drop on full socket problem
Thread-Index: ActF2OphQo1a/yerSdOJacZ6hje++AQmD8Lg
From: "Thomas Rauscher" <trauscher@loytec.com>
To: <libssh2-devel@cool.haxx.se>
X-Cloudmark-Analysis: v=1.1 cv=V15LrGZDFsIOLQGhFSBQucROxfiwgIeIJ7AmZ+xKGd4=
	c=1 sm=0 a=75lYxcfJ5vsA:10 a=kj9zAlcOel0A:10
	a=sm2m7qFRetkY292NDw0A:9 a=nzOw_6zhUQbUmtbiYKYA:7
	a=OgUFiBbSXydO3ar-B5orOuTHvKAA:4 a=CjuIK1q_8ugA:10
	a=HpAAvcLHHh0Zw7uRqdWCyQ==:117
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Fri, 17 Sep 2010 16:10:04 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Fri, 17 Sep 2010 16:09:34 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se


Hi,
 
I think I've found a problem that occurs when writing to the send socket returns -1 (EGAIN).
Additional preconditions to trigger the problem are writing in larger chunks than the 
advertized window size, e.g. 128k writes vs. 12k window size.

The remote side is a dropbear SSH server which seems use 12k window size increments.
This means that packets need to be split very often. If additionally the socket buffer
gets full, the saved packet is never sent.

A workaround is to use smaller writes (1k), but this only hides the problem.

Details:
 
1) The application calls _libssh2_channel_write(..., 128*1024);

  * In _libssh2_transport_write()

    _libssh2_send returns -1 (EAGAIN) and the current packet is saved to p->odata, p->olen ...

  * _libssh2_transport_write() returns LIBSSH2_ERROR_EAGAIN to _libssh2_channel_write() which executes
  
    if(wrote) {
      _libssh2_transport_drain(session);
      goto _channel_write_done;
    }
 
    _libssh2_transport_drain() frees p->outbuf and sets it to NULL.
 
  * _libssh2_transport_write then returns "wrote" (12k) to the application.
 
2) Application calls _libssh2_channel_write(..., 128*1024) again.
 
  _libssh2_transport_write() now calls send_existing() first which immediately returns because p->outbuf is NULL.

  if (!p->outbuf) {
    *ret = 0;
    return LIBSSH2_ERROR_NONE;
  }

  * This results in not sending the saved packet, but sending the next packet. The SSH server then
    bails out and terminates the connection (saying "bad packet size").

Many thanks for any ideas.
 
Regards,
Thomas Rauscher
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Wed Sep 22 13:53:00 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8MBqYbW020667;
	Wed, 22 Sep 2010 13:52:55 +0200
Received: from oproxy3-pub.bluehost.com (oproxy3-pub.bluehost.com [69.89.21.8])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with SMTP id o8MBqU7x020657
	for <libssh2-devel@cool.haxx.se>; Wed, 22 Sep 2010 13:52:32 +0200
Received: (qmail 9773 invoked by uid 0); 22 Sep 2010 11:52:28 -0000
Received: from unknown (HELO box439.bluehost.com) (69.89.31.239)
	by oproxy3.bluehost.com with SMTP; 22 Sep 2010 11:52:28 -0000
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default;
	d=moontechnolabs.com; 
	h=Received:From:Content-Type:Subject:Date:Message-Id:To:Mime-Version:X-Mailer:X-Identified-User;
	b=Ynlc0ZRMQhMAJclY5WKlGpzs5XscJ5gLXIMpjlmOcyu2Fyu4LBD0APbpEMIFc+zNyYjvkOEQ0voqju82FPP6UGYSiloevcrHOMLf69Vp5V3UeCuriA2NH3Onr5m5LKNx;
Received: from [122.170.37.171] (helo=[192.168.1.14])
	by box439.bluehost.com with esmtpsa (TLSv1:AES128-SHA:128)
	(Exim 4.69) (envelope-from <paresh.thakor@moontechnolabs.com>)
	id 1OyNsA-0007Jw-HX
	for libssh2-devel@cool.haxx.se; Wed, 22 Sep 2010 05:52:28 -0600
From: Paresh Thakor <paresh.thakor@moontechnolabs.com>
Subject: nano output
Date: Wed, 22 Sep 2010 17:22:18 +0530
Message-Id: <C97B4138-D981-40A7-AD8A-C978F3749C2D@moontechnolabs.com>
To: libssh2 development <libssh2-devel@cool.haxx.se>
Mime-Version: 1.0 (Apple Message framework v1078)
X-Mailer: Apple Mail (2.1078)
X-Identified-User: {1089:box439.bluehost.com:moonsoft:moontechnolabs.com}
	{sentby:smtp auth 122.170.37.171 authed with
	paresh.thakor@moontechnolabs.com}
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Wed, 22 Sep 2010 13:53:00 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Wed, 22 Sep 2010 13:52:33 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============1342796131=="
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se


--===============1342796131==
Content-Type: multipart/alternative; boundary=Apple-Mail-1--241023293


--Apple-Mail-1--241023293
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

Hi,

excerpt from string with libssh2_channel_read()

=
\x1b)0\x1b7\x1b[?47h\x1b[1;74r\x1b[0m\x0f\x1b[4l\x1b[?7h\x1b[?25h\x1b[?1h\=
x1b=3D\x1b[?1h\x1b=3D\x1b[?1h\x1b=3D\x1b[39;49m\x1b[39;49m\x1b[0m\x0f\x1b[=
H\x1b[2J\x1b[0;7m\x0f  GNU=20

NSString conversion of above:

[39;49m[39;49m[0m[H[2J[0;7m  GNU nano 2.0.6                              =
      New Buffer                                                         =
                     [73;1H^G[0m Get Help[73;24H[0;7m^O[0m =
WriteOut[73;47H[0;7m^R[0m Read File[73;70H[0;7m^Y[0m Prev =
Page[73;93H[0;7m^K[0m Cut Text[73;116H[0;7m^C[0m Cur Pos
[74d[0;7m^X[0m Exit[74;24H[0;7m^J[0m Justify[74;47H[0;7m^W[0m Where =
Is[74;70H[0;7m^V[0m Next Page[74;93H[0;7m^U[0m UnCut =
Text[74;116H[0;7m^T[0m To Spell

So, how can i decide that the string is with this color and which =
character indicates what? What kind of character encoding i need to use =
to decode the above string, so, i can get idea that 'GN=10U nano ...' =
should be printed in reverse mode, etc.? How to decide we need to print =
tabs, etc=10? I need to implement virtual terminal but don't know how to =
decode characters and draw terminal on UIView.

Regards,
Paresh Thakor.=

--Apple-Mail-1--241023293
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=us-ascii

<html><head></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; =
">Hi,<div><br></div><div>excerpt from string with =
libssh2_channel_read()</div><div><br></div><div><div style=3D"margin-top: =
0px; margin-right: 0px; margin-bottom: 0px; margin-left: 28px; =
text-indent: -28px; font: normal normal normal 11px/normal Menlo; =
"><b>\x1b)0\x1b7\x1b[?47h\x1b[1;74r\x1b[0m\x0f\x1b[4l\x1b[?7h\x1b[?25h\x1b=
[?1h\x1b=3D\x1b[?1h\x1b=3D\x1b[?1h\x1b=3D\x1b[39;49m\x1b[39;49m\x1b[0m\x0f=
\x1b[H\x1b[2J\x1b[0;7m\x0f&nbsp; GNU&nbsp;</b></div></div><div =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 28px; text-indent: -28px; font: normal normal normal =
11px/normal Menlo; "><b><br></b></div><div style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: =
-28px; font: normal normal normal 11px/normal Menlo; ">NSString =
conversion of above:</div><div style=3D"margin-top: 0px; margin-right: =
0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: =
normal normal normal 11px/normal Menlo; "><b><br></b></div><div =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 28px; text-indent: -28px; font: normal normal normal =
11px/normal Menlo; "><b><div style=3D"margin-top: 0px; margin-right: =
0px; margin-bottom: 0px; margin-left: 28px; text-indent: -28px; font: =
normal normal normal 11px/normal Menlo; =
"><b>[39;49m[39;49m[0m[H[2J[0;7m&nbsp; GNU nano 2.0.6&nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; New Buffer&nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [73;1H^G[0m Get =
Help[73;24H[0;7m^O[0m WriteOut[73;47H[0;7m^R[0m Read =
File[73;70H[0;7m^Y[0m Prev Page[73;93H[0;7m^K[0m Cut =
Text[73;116H[0;7m^C[0m Cur Pos</b></div><div style=3D"margin-top: 0px; =
margin-right: 0px; margin-bottom: 0px; margin-left: 28px; text-indent: =
-28px; font: normal normal normal 11px/normal Menlo; "><b>[74d[0;7m^X[0m =
Exit[74;24H[0;7m^J[0m Justify[74;47H[0;7m^W[0m Where Is[74;70H[0;7m^V[0m =
Next Page[74;93H[0;7m^U[0m UnCut Text[74;116H[0;7m^T[0m To =
Spell</b></div></b></div><div><br></div><div>So, how can i decide that =
the string is with this color and which character indicates what? What =
kind of character encoding i need to use to decode the above string, so, =
i can get idea that 'GN=10U nano ...' should be printed in reverse mode, =
etc.? How to decide we need to print tabs, etc=10? I need to implement =
virtual terminal but don't know how to decode characters and draw =
terminal on UIView.</div><div><br></div><div>Regards,</div><div>Paresh =
Thakor.</div></body></html>=

--Apple-Mail-1--241023293--

--===============1342796131==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============1342796131==--

From libssh2-devel-bounces@cool.haxx.se  Wed Sep 22 13:57:54 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8MBvp2O022619;
	Wed, 22 Sep 2010 13:57:53 +0200
Received: from mail0.avcosystems.co.uk (mail0.avcosystems.co.uk
	[195.224.236.86])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8MBvnx9022601
	for <libssh2-devel@cool.haxx.se>; Wed, 22 Sep 2010 13:57:49 +0200
Received: from lexx.avco ([192.168.0.1] helo=lyta)
	by mail0.avcosystems.co.uk with esmtp (Exim 4.69 #1 (Debian))
	(envelope-from <mts-filtered@avcosystems.co.uk>) id 1OyNxG-0003SP-B0
	for <libssh2-devel@cool.haxx.se>; Wed, 22 Sep 2010 12:57:42 +0100
From: "Mark Smith" <mts-filtered@avcosystems.co.uk>
To: "'libssh2 development'" <libssh2-devel@cool.haxx.se>
References: <C97B4138-D981-40A7-AD8A-C978F3749C2D@moontechnolabs.com>
Subject: RE: nano output
Date: Wed, 22 Sep 2010 12:57:44 +0100
Message-ID: <F87FF00834E94A5193A0921522CF2F54@internal.avcosystems.com>
MIME-Version: 1.0
X-Mailer: Microsoft Office Outlook 11
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994
Thread-Index: ActaTLyyZ8vTYn/dRd22V4zZhpouqAAAGtQg
In-Reply-To: <C97B4138-D981-40A7-AD8A-C978F3749C2D@moontechnolabs.com>
X-AVCO-Scan-Signature: 877d5c8512de154eeea80135b893fb91
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Wed, 22 Sep 2010 13:57:54 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Wed, 22 Sep 2010 13:57:50 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Paresh wrote:

> So, how can i decide that the string is with this color and 
> which character indicates what? What kind of character 
> encoding i need to use to decode the above string, so, i can 
> get idea that 'GNU nano ...' should be printed in reverse 
> mode, etc.? How to decide we need to print tabs, etc? I need 
> to implement virtual terminal but don't know how to decode 
> characters and draw terminal on UIView.

This topic is beyond the scope of a transport library like libssh2.  Perhaps
you'd like to investigate terminal implementations such as VT100, VT220...

http://en.wikipedia.org/wiki/VT100
http://en.wikipedia.org/wiki/VT220

HTH,

-- 
Mark Smith, libssh2 lurker

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

From libssh2-devel-bounces@cool.haxx.se  Wed Sep 22 16:55:29 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8MEs3Rg004283;
	Wed, 22 Sep 2010 16:55:25 +0200
Received: from toccata.fugue.com (toccata.fugue.com [204.152.186.142])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8MEs0bo004205
	for <libssh2-devel@cool.haxx.se>; Wed, 22 Sep 2010 16:54:01 +0200
Received: from [192.168.1.110] (unknown [206.128.65.121])
	by toccata.fugue.com (Postfix) with ESMTPSA id 60FE734E53C1
	for <libssh2-devel@cool.haxx.se>; Wed, 22 Sep 2010 10:53:52 -0400 (EDT)
Mime-Version: 1.0 (Apple Message framework v1081)
Subject: Re: nano output
From: Ted Lemon <mellon@fugue.com>
In-Reply-To: <C97B4138-D981-40A7-AD8A-C978F3749C2D@moontechnolabs.com>
Date: Wed, 22 Sep 2010 07:53:33 -0700
Message-Id: <AF806B3D-AB92-408C-8C9C-71F9A5FEE48D@fugue.com>
References: <C97B4138-D981-40A7-AD8A-C978F3749C2D@moontechnolabs.com>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Mailer: Apple Mail (2.1081)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Wed, 22 Sep 2010 16:55:29 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Wed, 22 Sep 2010 16:54:01 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

On Sep 22, 2010, at 4:52 AM, Paresh Thakor wrote:
> So, how can i decide that the string is with this color and which character indicates what? What kind of character encoding i need to use to decode the above string, so, i can get idea that 'GNU nano ...' should be printed in reverse mode, etc.? How to decide we need to print tabs, etc? I need to implement virtual terminal but don't know how to decode characters and draw terminal on UIView.

That's a very long story.   Google ecma-48.   Really not something we can help you with here. 

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

From libssh2-devel-bounces@cool.haxx.se  Wed Sep 22 17:27:12 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8MFR4Gj024131;
	Wed, 22 Sep 2010 17:27:12 +0200
Received: from foo.birdnet.se (qmailr@foo.birdnet.se [213.88.146.6])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with SMTP id o8MFR39D024117
	for <libssh2-devel@cool.haxx.se>; Wed, 22 Sep 2010 17:27:03 +0200
Received: (qmail 7266 invoked by uid 501); 22 Sep 2010 15:27:00 -0000
Message-ID: <20100922152700.7265.qmail@stuge.se>
Date: Wed, 22 Sep 2010 17:27:00 +0200
From: Peter Stuge <peter@stuge.se>
To: libssh2-devel@cool.haxx.se
Subject: Re: nano output
Mail-Followup-To: libssh2-devel@cool.haxx.se
References: <C97B4138-D981-40A7-AD8A-C978F3749C2D@moontechnolabs.com>
MIME-Version: 1.0
Content-Disposition: inline
In-Reply-To: <C97B4138-D981-40A7-AD8A-C978F3749C2D@moontechnolabs.com>
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Wed, 22 Sep 2010 17:27:12 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Wed, 22 Sep 2010 17:27:03 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

Paresh Thakor wrote:
> I need to implement virtual terminal but don't know how to decode
> characters and draw terminal on UIView.

Reuse the terminal emulator in the mobile terminal that I googled for
you several months ago when I explained that you must implement a
terminal emulator. You may discover that UIView is useless for your
application.


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

From libssh2-devel-bounces@cool.haxx.se  Thu Sep 23 11:38:16 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8N9bVQx013699;
	Thu, 23 Sep 2010 11:38:10 +0200
Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com
	[209.85.214.54])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8N9bTQ2013689
	for <libssh2-devel@cool.haxx.se>; Thu, 23 Sep 2010 11:37:30 +0200
Received: by bwz15 with SMTP id 15so1866880bwz.41
	for <libssh2-devel@cool.haxx.se>; Thu, 23 Sep 2010 02:37:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:received:date:message-id
	:subject:from:to:content-type;
	bh=7cKwOYQC0Wn6Jqra+GBpUDorJpPcGyc9o4vGsLtz0Bs=;
	b=pUvu1ibWHlxtnqe15Mupri38jFvw+UBX7syi2OIBVy0mHW0FX/VMkEUBa9uaNZwgJ+
	tKYAy7W8gylWOXWLbxyo6oJ3tHIPduVKxxX6zhxULVuseBa7/kRmn8qYon3hi6Zfl6Dw
	InCvc9hzk2/z2NeOyTP3EXVNCohkiPtgnoaaA=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:date:message-id:subject:from:to:content-type;
	b=q6m2JMPbF5AMVGTpjMl7G8AXr6+wgUSAz86SbJFksZ2lCrVna9v+KyWBOCghUnE+i2
	rMJ5hvmA5xxSh+nBIXr4Dw92u3Rtc9YvjfaqsHCQO/gaRuMkdsF+DZWW4uv4UCVLbHVC
	LQp5aQbIHACJLtb/ytTob0zkwKWEug630aYNA=
MIME-Version: 1.0
Received: by 10.204.98.198 with SMTP id r6mr992387bkn.51.1285234647107; Thu,
	23 Sep 2010 02:37:27 -0700 (PDT)
Received: by 10.204.24.131 with HTTP; Thu, 23 Sep 2010 02:37:27 -0700 (PDT)
Date: Thu, 23 Sep 2010 17:37:27 +0800
Message-ID: <AANLkTi=W=CmWWYbAa-TpX=zTML_VCdrEkLqJqze4tmLs@mail.gmail.com>
Subject: libssh2_userauth_publickey_fromfile with public key
From: caosuwei <caosuwei@gmail.com>
To: libssh2-devel@cool.haxx.se
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Thu, 23 Sep 2010 11:38:16 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Thu, 23 Sep 2010 11:37:30 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============1862357225=="
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

--===============1862357225==
Content-Type: multipart/alternative; boundary=001636499f779807c40490ea029c

--001636499f779807c40490ea029c
Content-Type: text/plain; charset=UTF-8

Hi guys,
I want to use libssh2_suerauth_publickey_fromfile() to copy file to remote
sever.
But there are some questions:

1. why do I have to use public key or passphrase to do the authentication?
    If public key is NULL, the error message will be "Unable to open public
key file"

2. If I use
          libssh2_userauth_publickey_fromfile(session, username,
"/home/caosuwei/.ssh/id_rsa.pub", "/home/caosuwei/.ssh/id_rsa", "123456"));
    the error message will be "(-18) Username/PublicKey combination invalid"

   What should I do with it ?

Thanks.

-- 
caosuwei

--001636499f779807c40490ea029c
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Hi guys,<br>I want to use libssh2_suerauth_publickey_fromfile() to copy fil=
e to remote sever.<br>But there are some questions:<br><br>1. why do I have=
 to use public key or passphrase to do the authentication? <br>=C2=A0=C2=A0=
=C2=A0 If public key is NULL, the error message will be &quot;Unable to ope=
n public key file&quot;<br>
<br>2. If I use <br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 =
libssh2_userauth_publickey_fromfile(session, username,
&quot;/home/caosuwei/.ssh/id_rsa.pub&quot;, &quot;/home/caosuwei/.ssh/id_rs=
a&quot;, &quot;123456&quot;));<br>=C2=A0=C2=A0=C2=A0 the error message will=
 be &quot;(-18) Username/PublicKey combination invalid&quot;<br><br>=C2=A0=
=C2=A0 What should I do with it ?<br>
<br>Thanks.<br clear=3D"all"><br>-- <br>caosuwei<br>

--001636499f779807c40490ea029c--

--===============1862357225==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============1862357225==--

From libssh2-devel-bounces@cool.haxx.se  Thu Sep 23 12:20:59 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8NAKorm007409;
	Thu, 23 Sep 2010 12:20:58 +0200
Received: from oproxy2-pub.bluehost.com (oproxy2-pub.bluehost.com
	[67.222.39.60])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with SMTP id o8NAKlwY007320
	for <libssh2-devel@cool.haxx.se>; Thu, 23 Sep 2010 12:20:48 +0200
Received: (qmail 6376 invoked by uid 0); 23 Sep 2010 10:20:45 -0000
Received: from unknown (HELO box439.bluehost.com) (69.89.31.239)
	by oproxy2.bluehost.com with SMTP; 23 Sep 2010 10:20:44 -0000
DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default;
	d=moontechnolabs.com; 
	h=Received:Content-Type:Mime-Version:Subject:From:In-Reply-To:Date:Content-Transfer-Encoding:Message-Id:References:To:X-Mailer:X-Identified-User;
	b=bwI06S5G1T0mDrfGEnE19O6W3bgOMat10MfHi/Rr6FoREj0TWec4FqHpol4Vvrx5/Exc+Yr9/2lNi7QYQjcS741u8pz30UEoJ+pdbXF5r9fmt+IQq5cPfuxE5k9n9Cry;
Received: from [122.169.71.177] (helo=[192.168.1.14])
	by box439.bluehost.com with esmtpsa (TLSv1:AES128-SHA:128)
	(Exim 4.69) (envelope-from <paresh.thakor@moontechnolabs.com>)
	id 1Oyiuy-0006y0-B2
	for libssh2-devel@cool.haxx.se; Thu, 23 Sep 2010 04:20:44 -0600
Mime-Version: 1.0 (Apple Message framework v1078)
Subject: Re: libssh2_userauth_publickey_fromfile with public key
From: Paresh Thakor <paresh.thakor@moontechnolabs.com>
In-Reply-To: <AANLkTi=W=CmWWYbAa-TpX=zTML_VCdrEkLqJqze4tmLs@mail.gmail.com>
Date: Thu, 23 Sep 2010 15:50:37 +0530
Message-Id: <B38CCECE-BB5B-4F05-A07C-76BA9CDFD34C@moontechnolabs.com>
References: <AANLkTi=W=CmWWYbAa-TpX=zTML_VCdrEkLqJqze4tmLs@mail.gmail.com>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Mailer: Apple Mail (2.1078)
X-Identified-User: {1089:box439.bluehost.com:moonsoft:moontechnolabs.com}
	{sentby:smtp auth 122.169.71.177 authed with
	paresh.thakor@moontechnolabs.com}
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Thu, 23 Sep 2010 12:20:59 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Thu, 23 Sep 2010 12:20:49 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se


> Hi guys,
> I want to use libssh2_suerauth_publickey_fromfile() to copy file to remote sever.
> But there are some questions:
> 
> 1. why do I have to use public key or passphrase to do the authentication? 
>     If public key is NULL, the error message will be "Unable to open public key file"
> 
> 2. If I use 
>           libssh2_userauth_publickey_fromfile(session, username, "/home/caosuwei/.ssh/id_rsa.pub", "/home/caosuwei/.ssh/id_rsa", "123456"));
>     the error message will be "(-18) Username/PublicKey combination invalid"
> 
>    What should I do with it ?

	=> Please check that you have generated public and private key-pair on your system. Then you need to copy contents of your public key into authorized_keys2 file of remote computer. Remote computer is to which you need to connect.

> 
> Thanks.
> 
> -- 
> caosuwei
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

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

From libssh2-devel-bounces@cool.haxx.se  Fri Sep 24 00:36:54 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8NMaSXV005779;
	Fri, 24 Sep 2010 00:36:49 +0200
Received: from uptecs.com (jacobrhoden.xen.prgmr.com [68.68.99.217])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8NMaOb0005754
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Fri, 24 Sep 2010 00:36:26 +0200
Received: from [10.0.1.15] (110-174-160-164.static.tpgi.com.au
	[110.174.160.164])
	(using TLSv1 with cipher AES128-SHA (128/128 bits))
	(No client certificate requested)
	by uptecs.com (Postfix) with ESMTPSA id 975D710B3C4
	for <libssh2-devel@cool.haxx.se>; Thu, 23 Sep 2010 22:43:43 +0000 (UTC)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=uptecs.com; s=default;
	t=1285281824; bh=xnwX9DatvLZFgPDEdB8g4PtwlaG5/N6hfDp5PZQVPIE=;
	h=From:Content-Type:Subject:Date:Message-Id:To:Mime-Version;
	b=AWJPRkHD9LsD1qbMMkXiA1S/Sqjtjf26c5GVEsNuy8JGv3zLU4rwTarSUstM41boY
	NEB+RyzcfoINaKYevcXtQQlASUycUylCUERb46y4+cC5alxn9cKyRk1C0GdPQ7vqXs
	8pE/HZPZO9/Ywu3zcuL8etG9rLE5xktdL0hbyBw4=
From: Jacob Rhoden <jacob@uptecs.com>
Subject: Beginner question on example code
Date: Fri, 24 Sep 2010 08:36:15 +1000
Message-Id: <10DE81BF-17F1-454E-BFD6-B0B0300CF312@uptecs.com>
To: libssh2-devel@cool.haxx.se
Mime-Version: 1.0 (Apple Message framework v1081)
X-Mailer: Apple Mail (2.1081)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Fri, 24 Sep 2010 00:36:54 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Fri, 24 Sep 2010 00:36:26 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0765132908=="
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se


--===============0765132908==
Content-Type: multipart/alternative; boundary=Apple-Mail-1--115985642


--Apple-Mail-1--115985642
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

Hi Guys,

Let me know if this is not the right place to ask. I have downloaded =
libssh2 onto my OS/X 10.6 box. it compiles, and the test runs fine.

When I compile and link the ssh2_exec.c example, and try the example, I =
get "Authentication by password failed", the "libssh2_userauth_password" =
method is returning LIBSSH2_ERROR_AUTHENTICATION_FAILED

Can anyone help me understand why this might happen. Yes my =
username/password is correct. The documentation does lead me to believe =
the only reason this error could occur would be due to an incorrect =
username and/or password:

    http://www.libssh2.org/libssh2_userauth_password_ex.html

The example code does also report:
    "Host check: 2, key: <none>"

However I don't care about host key checking at this point.

Thanks,
Jacob

"A midnight knock on the door, followed by midnight execution is no way =
that the Australian prime minister should be treated." -- Tony Abbott



--Apple-Mail-1--115985642
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=us-ascii

<html><head></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi =
Guys,<div><br></div><div>Let me know if this is not the right place to =
ask. I have downloaded libssh2 onto my OS/X 10.6 box. it compiles, and =
the test runs fine.</div><div><br></div><div>When I compile and link the =
ssh2_exec.c example, and try the example, I get "Authentication by =
password failed", the "libssh2_userauth_password" method is =
returning&nbsp;LIBSSH2_ERROR_AUTHENTICATION_FAILED</div><div><br></div><di=
v>Can anyone help me understand why this might happen. Yes my =
username/password is correct. The documentation does lead me to believe =
the only reason this error could occur would be due to an incorrect =
username and/or password:</div><div><br></div><div>&nbsp;&nbsp; &nbsp;<a =
href=3D"http://www.libssh2.org/libssh2_userauth_password_ex.html">http://w=
ww.libssh2.org/libssh2_userauth_password_ex.html</a><br><div><br =
class=3D"webkit-block-placeholder"></div><div>The example code does also =
report:</div><div><div>&nbsp;&nbsp; &nbsp;"Host check: 2, key: =
&lt;none&gt;"</div></div><div><br></div><div>However I don't care about =
host key checking at this =
point.</div><div><br></div><div>Thanks,</div><div>Jacob</div><div>
<div style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; =
-webkit-line-break: after-white-space; "><div style=3D"word-wrap: =
break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space; "><br>"A midnight knock on the door, followed by =
midnight&nbsp;execution is no way that the Australian prime =
minister&nbsp;should be treated." -- Tony Abbott<br><br></div></div>
</div>
<br></div></body></html>=

--Apple-Mail-1--115985642--

--===============0765132908==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--===============0765132908==--

From libssh2-devel-bounces@cool.haxx.se  Fri Sep 24 00:50:05 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8NMnxxv011434;
	Fri, 24 Sep 2010 00:50:04 +0200
Received: from toccata.fugue.com (toccata.fugue.com [204.152.186.142])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8NMnu5s011421
	for <libssh2-devel@cool.haxx.se>; Fri, 24 Sep 2010 00:49:57 +0200
Received: from [192.168.1.110] (unknown [206.128.65.121])
	by toccata.fugue.com (Postfix) with ESMTPSA id 3D40634E4477
	for <libssh2-devel@cool.haxx.se>; Thu, 23 Sep 2010 18:50:08 -0400 (EDT)
Mime-Version: 1.0 (Apple Message framework v1081)
Subject: Re: Beginner question on example code
From: Ted Lemon <mellon@fugue.com>
In-Reply-To: <10DE81BF-17F1-454E-BFD6-B0B0300CF312@uptecs.com>
Date: Thu, 23 Sep 2010 15:49:49 -0700
Message-Id: <770E29B4-C091-4368-A7F0-1B7D328FDEEE@fugue.com>
References: <10DE81BF-17F1-454E-BFD6-B0B0300CF312@uptecs.com>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Mailer: Apple Mail (2.1081)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Fri, 24 Sep 2010 00:50:05 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Fri, 24 Sep 2010 00:49:57 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

On Sep 23, 2010, at 3:36 PM, Jacob Rhoden wrote:
> Can anyone help me understand why this might happen. Yes my username/password is correct. The documentation does lead me to believe the only reason this error could occur would be due to an incorrect username and/or password:

Does the host allow password authentication?


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

From libssh2-devel-bounces@cool.haxx.se  Fri Sep 24 03:22:48 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8O1MUbM009945;
	Fri, 24 Sep 2010 03:22:45 +0200
Received: from earth.stuge.se (earth.stuge.se [213.88.146.15])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8O1MSGo009885
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Fri, 24 Sep 2010 03:22:28 +0200
Received: (qmail 6341 invoked from network); 24 Sep 2010 01:22:22 -0000
Received: from unknown (HELO earth.stuge.se) (127.0.0.1)
	by localhost with SMTP; 24 Sep 2010 01:22:22 -0000
MIME-Version: 1.0
From: "libssh2 Trac" <trac@libssh2.stuge.se>
X-Trac-Version: 0.12b1
Precedence: bulk
Cc: libssh2-devel@cool.haxx.se
Auto-Submitted: auto-generated
X-Mailer: Trac 0.12b1, by Edgewall Software
X-Trac-Project: libssh2
Date: Fri, 24 Sep 2010 01:22:22 -0000
X-URL: http://trac.libssh2.org/
Subject: [libssh2] #186: libssh gets stuck at
	kex_method_diffie_hellman_groupGP_sha1_key_exchange. CPU
	utilization goes upto 100%
X-Trac-Ticket-URL: http://trac.libssh2.org/ticket/186
Message-ID: <108.a5a9892915fbecf282faa78e591a6c63@libssh2.stuge.se>
X-Trac-Ticket-ID: 186
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Fri, 24 Sep 2010 03:22:48 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Fri, 24 Sep 2010 03:22:28 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Reply-To: trac@libssh2.stuge.se,
        libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

#186: libssh gets stuck at kex_method_diffie_hellman_groupGP_sha1_key_exchange.
CPU utilization goes upto 100%
--------------------------------------------------------------------------------------+
 Reporter:  www.google.com/accounts/o8/id?id=aitoawlhggg_yplkl7grwwpbbum-omtqud4rmna  |       Owner:       
     Type:  defect                                                                    |      Status:  new  
 Priority:  normal                                                                    |   Milestone:  1.2.6
Component:  crypto                                                                    |     Version:  1.2.2
 Keywords:                                                                            |      Blocks:       
Blocked By:                                                                            |  
--------------------------------------------------------------------------------------+
 Hello,

 We are using libssh2 to programatically ssh into routers. Overall the
 experience with the library has been very good. However intermittently our
 processes get stuck while trying to login to a Juniper (running Junos
 8.1R4.3) routers. Doing a backtrace we get
 (gdb) bt
 #0  0x00002b9d4f8f7262 in gcry_mpi_copy () from /usr/lib64/libgcrypt.so.11
 #1  0x00002b9d4f8f4f84 in gcry_mpi_scan () from /usr/lib64/libgcrypt.so.11
 #2  0x00002b9d4f8f2d41 in gcry_mpi_powm () from /usr/lib64/libgcrypt.so.11
 #3  0x00002b9d4b6c76e7 in
 kex_method_diffie_hellman_groupGP_sha1_key_exchange
 (session=0x156d770, g=0x1282050, p=0x11b0640, group_order=129,
     packet_type_init=32 ' ', packet_type_reply=33 '!', midhash=0x14f2a51
 "",
 midhash_len=138, exchange_state=0x1571b70) at kex.c:108
 #4  0x00002b9d4b6c8e9c in
 kex_method_diffie_hellman_group_exchange_sha1_key_exchange
 (session=0x156d770,
 key_state=0x1571b58) at kex.c:886
 #5  0x00002b9d4b6c9b00 in libssh2_kex_exchange (session=0x156d770,
 reexchange=<value optimized out>, key_state=0x1571b40) at kex.c:1766
 #6  0x00002b9d4b6d140e in libssh2_session_startup (session=0x156d770,
 sock=22)
 at session.c:594
 #7  0x00000000004d8243 in SSHSession::setupSession ()
 #8  0x00000000004e4678 in QuerySession::doWrite ()
 #9  0x00000000004d9985 in QuerySession::fdWriteReady ()
 #10 0x00000000007a2d15 in Scheduler::run ()
 #11 0x00000000005230c8 in main ()
 (gdb)

 We have looked quite thoroughly at our code to determine any memory
 corruptions and the like, but we couldn't find any. The error occurs only
 for this particular platform and s/w version. This makes us think that
 there may be a condition in the library code which could be causing this
 problem. Please advise on the best way to address this concern.

 Thanks,
 Jasmeet

-- 
Ticket URL: <http://trac.libssh2.org/ticket/186>
libssh2 <http://trac.libssh2.org/>
C library for writing portable SSH2 clients
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Fri Sep 24 11:07:33 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8O96m5d013044;
	Fri, 24 Sep 2010 11:07:27 +0200
Received: from mail.ritual.org (146.n01.hh.clusters.de [213.238.52.146])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8O96kOR013039
	for <libssh2-devel@cool.haxx.se>; Fri, 24 Sep 2010 11:06:47 +0200
Received: from spring.local (spring.ritual.org [217.91.25.149])
	(authenticated bits=0)
	by mail.ritual.org (8.12.9/8.12.9) with ESMTP id o8O96iUF031569
	for <libssh2-devel@cool.haxx.se>; Fri, 24 Sep 2010 11:06:44 +0200
Received: from [IPv6:::1] (localhost [IPv6:::1])
	by spring.local (Postfix) with ESMTP id 689493289B52
	for <libssh2-devel@cool.haxx.se>; Fri, 24 Sep 2010 11:06:44 +0200 (CEST)
Mime-Version: 1.0 (Apple Message framework v1081)
Subject: Re: Beginner question on example code
From: Uli Zappe <uli@ritual.org>
In-Reply-To: <770E29B4-C091-4368-A7F0-1B7D328FDEEE@fugue.com>
Date: Fri, 24 Sep 2010 11:06:44 +0200
Message-Id: <85E62A62-0931-474F-B4A2-2A15CCD1F12A@spring.local>
References: <10DE81BF-17F1-454E-BFD6-B0B0300CF312@uptecs.com>
	<770E29B4-C091-4368-A7F0-1B7D328FDEEE@fugue.com>
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-Mailer: Apple Mail (2.1081)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Fri, 24 Sep 2010 11:07:33 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Fri, 24 Sep 2010 11:06:47 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se


Am 24.09.2010 um 00:49 schrieb Ted Lemon:

> On Sep 23, 2010, at 3:36 PM, Jacob Rhoden wrote:
>> Can anyone help me understand why this might happen. Yes my username/pas=
sword is correct. The documentation does lead me to believe the only reason=
 this error could occur would be due to an incorrect username and/or passwo=
rd:
> =

> Does the host allow password authentication?

I guess that's the issue - Jacob will most probably have tried to connect t=
o a Mac OS X host, and Mac OS X's shhd configuration does not allow passwor=
d authentication.

So, Jacob, you'll have to add interactive keyboard authentication to the ex=
ample code first before you can successfully use it on Mac OS X.

The sftp.c and ssh2.c examples show how to do this.

            Bye
                    Uli
________________________________________________________

  Uli Zappe, Solmsstra=DFe 5, D-65189 Wiesbaden, Germany
  http://www.ritual.org
  Fon: +49-700-ULIZAPPE
  Fax: +49-700-ZAPPEFAX
________________________________________________________

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

From libssh2-devel-bounces@cool.haxx.se  Thu Sep 30 04:15:57 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8U2FPV2022875;
	Thu, 30 Sep 2010 04:15:51 +0200
Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com
	[209.85.214.182])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8U2FKVB022844
	for <libssh2-devel@cool.haxx.se>; Thu, 30 Sep 2010 04:15:21 +0200
Received: by iwn34 with SMTP id 34so2556840iwn.41
	for <libssh2-devel@cool.haxx.se>; Wed, 29 Sep 2010 19:15:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:received:date:message-id
	:subject:from:to:content-type;
	bh=E1CcnB3o1pwNXscJwnfEHnDzO18TCKKG3Ma5PRyfUwc=;
	b=ORkeq0aC0hQE1p00g2VJ2BbMpWdNGBMEJnmqrlMB+glCV6T5tUEemDKGXEp7jAbeXS
	/etaBFmxTFhmadwG3KKZnAEUmSSCP4QrsCRaGXl+pUemE17LZi/1W6z1AwpIosdGjYwi
	IwdwJVVH0aJKGnvV0l7halt6gUgoa3iPkXIAk=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:date:message-id:subject:from:to:content-type;
	b=JTSrcMIuRUg7vUhtOKkuL49U08e9513S8HbdExm0IvQRVY5h2slQXMM+wYGM/STvjU
	LPivwUc1sQFCQhfa00/wUUVgR+W5PuT92V9RA6ugVApCeAWvyxTMuKvcuyHHq9F+mOcw
	jL+ae9zm3UUlxj3xWVYp5gwW99+Z9vy7MebqA=
MIME-Version: 1.0
Received: by 10.231.11.8 with SMTP id r8mr2674259ibr.135.1285812918657; Wed,
	29 Sep 2010 19:15:18 -0700 (PDT)
Received: by 10.220.169.21 with HTTP; Wed, 29 Sep 2010 19:15:18 -0700 (PDT)
Date: Wed, 29 Sep 2010 19:15:18 -0700
Message-ID: <AANLkTi=UhWvoEqBZ5izQ12_pEnsgmQrON3nZ_zFOjKYn@mail.gmail.com>
Subject: Unable to connect to SFTP server using SSH-2.0-SSHD
From: Sriram Swaminathan <sriramswamy@gmail.com>
To: libssh2-devel@cool.haxx.se
Content-Type: multipart/mixed; boundary=00032557416e43b543049170a605
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Thu, 30 Sep 2010 04:15:56 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Thu, 30 Sep 2010 04:15:21 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

--00032557416e43b543049170a605
Content-Type: multipart/alternative; boundary=00032557416e43b537049170a603

--00032557416e43b537049170a603
Content-Type: text/plain; charset=ISO-8859-1

Hi,

I am using libssh2-1.2.7 in WINDOWS and try to connect to a server that is
using SSH-2.0-SSHD.
I am trying the same sftp.c to fetch a file from the server and am getting
an error - "Unable to send KEX init message"
Find attached the trace logs. Please help!!!!1

-Sriram

--00032557416e43b537049170a603
Content-Type: text/html; charset=ISO-8859-1

Hi,<br><br>I am using libssh2-1.2.7 in WINDOWS and try to connect to a server that is using SSH-2.0-SSHD.<br>I am trying the same sftp.c to fetch a file from the server and am getting an error - &quot;Unable to send KEX init message&quot;<br>
Find attached the trace logs. Please help!!!!1<br><br>-Sriram<br><br>

--00032557416e43b537049170a603--
--00032557416e43b543049170a605
Content-Type: text/plain; charset=US-ASCII; name="libssh2_trace.txt"
Content-Disposition: attachment; filename="libssh2_trace.txt"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_geozsfqy0

W2xpYnNzaDJdIDAuNDYxMTczIENvbm46IFNldHRpbmcgYmxvY2tpbmcgbW9kZSBPTg0KW2xpYnNz
aDJdIDAuNDYxMTczIFRyYW5zcG9ydDogc2Vzc2lvbl9zdGFydHVwIGZvciBzb2NrZXQgOTE2DQpb
bGlic3NoMl0gMC40NjExNzMgVHJhbnNwb3J0OiBTZW5kaW5nIEJhbm5lcjogU1NILTIuMC1saWJz
c2gyXzEuMi43DQpbbGlic3NoMl0gMC40NjExNzMgU29ja2V0OiBTZW50IDIzLzIzIGJ5dGVzIGF0
IDEwMDMzOUEwKzANCltsaWJzc2gyXSAwLjQ2MTE3MyBTb2NrZXQ6IEVycm9yIHJlY3ZpbmcgMSBi
eXRlcyB0byAwMDEyRjg4NDogMTENCltsaWJzc2gyXSAwLjQ2MTE3MyBGYWlsdXJlIEV2ZW50OiAt
MzcgLSBGYWlsZWQgZ2V0dGluZyBiYW5uZXINCltsaWJzc2gyXSAwLjUwODA0OCBTb2NrZXQ6IFJl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QgbWVzc2FnZQ0KW2xpYnNzaDJdIDAuNzg5Mjk4
IEZhaWx1cmUgRXZlbnQ6IC04IC0gVW5yZWNvdmVyYWJsZSBlcnJvciBleGNoYW5naW5nIGtleXMN
CltsaWJzc2gyXSAwLjc4OTI5OCBGYWlsdXJlIEV2ZW50OiAtOCAtIFVuYWJsZSB0byBleGNoYW5n
ZSBlbmNyeXB0aW9uIGtleXMNCkZhaWx1cmUgZXN0YWJsaXNoaW5nIFNTSCBzZXNzaW9uOiAtOA0K
--00032557416e43b543049170a605
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--00032557416e43b543049170a605--

From libssh2-devel-bounces@cool.haxx.se  Thu Sep 30 04:33:01 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8U2WpUE014021;
	Thu, 30 Sep 2010 04:32:58 +0200
Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com
	[209.85.210.54])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8U2K7FW032668
	for <libssh2-devel@cool.haxx.se>; Thu, 30 Sep 2010 04:20:07 +0200
Received: by pzk7 with SMTP id 7so756226pzk.41
	for <libssh2-devel@cool.haxx.se>; Wed, 29 Sep 2010 19:20:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
	h=domainkey-signature:mime-version:received:received:in-reply-to
	:references:date:message-id:subject:from:to:content-type;
	bh=f5ylyLhO3sii2q0fuPAkATBAlI9PQ8vvFY72Sp5+9Yo=;
	b=X/Rk0UZeEvZ3804aPuN/ovj2cHi21c02G+bIVCHosmDL6HEsKLsB4dxEmm1lhRiAl3
	H4WuaSrplMnFIj6MMLhb0czSGtqn7CcDHpSVNBnmO9sY4sG5J0Ig31AP6FCXEFbPq3NO
	loXKS1Gd6p+8QPp6eBx9bNKep+VSkmOAsrdEI=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
	h=mime-version:in-reply-to:references:date:message-id:subject:from:to
	:content-type;
	b=IqVyZf8gvaswxlK1A9u2uOmmNWaGbU4+ePY4rATt2SY+4GQ64iCvl5NjweFx9t8VFz
	JbsTEl6MEm4pVUQFq/4wNs6aPlpU2XsRyVJjCI0+4JUt/0WZ31YiV3NqmhnYIBAx3oOG
	q5GIE4cZ+ak+5lfN9CpikhpTxtd5xXKHX0md8=
MIME-Version: 1.0
Received: by 10.142.245.13 with SMTP id s13mr2360258wfh.149.1285813201185;
	Wed, 29 Sep 2010 19:20:01 -0700 (PDT)
Received: by 10.220.169.21 with HTTP; Wed, 29 Sep 2010 19:20:01 -0700 (PDT)
In-Reply-To: <AANLkTi=UhWvoEqBZ5izQ12_pEnsgmQrON3nZ_zFOjKYn@mail.gmail.com>
References: <AANLkTi=UhWvoEqBZ5izQ12_pEnsgmQrON3nZ_zFOjKYn@mail.gmail.com>
Date: Wed, 29 Sep 2010 19:20:01 -0700
Message-ID: <AANLkTikYY1xRfDnGet498uZB2Vb_jLGcmGTqZtbW1xpU@mail.gmail.com>
Subject: Re: Unable to connect to SFTP server using SSH-2.0-SSHD
From: Sriram Swaminathan <sriramswamy@gmail.com>
To: libssh2-devel@cool.haxx.se
Content-Type: multipart/mixed; boundary=000e0cd2deee1aaada049170b752
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Thu, 30 Sep 2010 04:32:59 +0200 (CEST)
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Thu, 30 Sep 2010 04:20:08 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

--000e0cd2deee1aaada049170b752
Content-Type: multipart/alternative; boundary=000e0cd2deee1aaad0049170b750

--000e0cd2deee1aaad0049170b750
Content-Type: text/plain; charset=ISO-8859-1

Attaching the source code as well.

On Wed, Sep 29, 2010 at 7:15 PM, Sriram Swaminathan
<sriramswamy@gmail.com>wrote:

> Hi,
>
> I am using libssh2-1.2.7 in WINDOWS and try to connect to a server that is
> using SSH-2.0-SSHD.
> I am trying the same sftp.c to fetch a file from the server and am getting
> an error - "Unable to send KEX init message"
> Find attached the trace logs. Please help!!!!1
>
> -Sriram
>
>

--000e0cd2deee1aaad0049170b750
Content-Type: text/html; charset=ISO-8859-1

Attaching the source code as well.<br><br><div class="gmail_quote">On Wed, Sep 29, 2010 at 7:15 PM, Sriram Swaminathan <span dir="ltr">&lt;<a href="mailto:sriramswamy@gmail.com">sriramswamy@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi,<br><br>I am using libssh2-1.2.7 in WINDOWS and try to connect to a server that is using SSH-2.0-SSHD.<br>
I am trying the same sftp.c to fetch a file from the server and am getting an error - &quot;Unable to send KEX init message&quot;<br>
Find attached the trace logs. Please help!!!!1<br><font color="#888888"><br>-Sriram<br><br>
</font></blockquote></div><br>

--000e0cd2deee1aaad0049170b750--
--000e0cd2deee1aaada049170b752
Content-Type: application/octet-stream; name="simple.c"
Content-Disposition: attachment; filename="simple.c"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_geozyosh1

LyoNCiAqICRJZDogc2Z0cC5jLHYgMS4xNyAyMDA5LzA0LzI4IDEwOjM1OjMwIGJhZ2RlciBFeHAg
JA0KICoNCiAqIFNhbXBsZSBzaG93aW5nIGhvdyB0byBkbyBTRlRQIHRyYW5zZmVycy4NCiAqDQog
KiBUaGUgc2FtcGxlIGNvZGUgaGFzIGRlZmF1bHQgdmFsdWVzIGZvciBob3N0IG5hbWUsIHVzZXIg
bmFtZSwgcGFzc3dvcmQNCiAqIGFuZCBwYXRoIHRvIGNvcHksIGJ1dCB5b3UgY2FuIHNwZWNpZnkg
dGhlbSBvbiB0aGUgY29tbWFuZCBsaW5lIGxpa2U6DQogKg0KICogInNmdHAgMTkyLjE2OC4wLjEg
dXNlciBwYXNzd29yZCAvdG1wL3NlY3JldHMgLXB8LWl8LWsiDQogKi8NCg0KI2luY2x1ZGUgImxp
YnNzaDJfY29uZmlnLmgiDQojaW5jbHVkZSA8bGlic3NoMi5oPg0KI2luY2x1ZGUgPGxpYnNzaDJf
c2Z0cC5oPg0KDQoNCiMgaW5jbHVkZSA8d2luc29jazIuaD4NCiNpbmNsdWRlIDxzeXMvdHlwZXMu
aD4NCiNpbmNsdWRlIDxmY250bC5oPg0KI2luY2x1ZGUgPGVycm5vLmg+DQojaW5jbHVkZSA8c3Rk
aW8uaD4NCiNpbmNsdWRlIDxjdHlwZS5oPg0KDQoNCmNvbnN0IGNoYXIgKmtleWZpbGUxPSJ+Ly5z
c2gvaWRfcnNhLnB1YiI7DQpjb25zdCBjaGFyICprZXlmaWxlMj0ifi8uc3NoL2lkX3JzYSI7DQpj
b25zdCBjaGFyICp1c2VybmFtZT0idXNlcm5hbWUiOw0KY29uc3QgY2hhciA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fb3BlbigpIGlzIGRv
bmUsIG5vdyByZWNlaXZlIGRhdGEhXG4iKTsNCiAgICBkbyB7DQogICAgICAgIGNoYXIgbWVtWzEw
MjRdOw0KDQogICAgICAgIC8qIGxvb3AgdW50aWwgd2UgZmFpbCAqLw0KICAgICAgICBmcHJpbnRm
KHN0ZGVyciwgImxpYnNzaDJfc2Z0cF9yZWFkKCkhXG4iKTsNCiAgICAgICAgcmMgPSBsaWJzc2gy
X3NmdHBfcmVhZChzZnRwX2hhbmRsZSwgbWVtLCBzaXplb2YobWVtKSk7DQogICAgICAgIGlmIChy
YyA+IDApIHsNCiAgICAgICAgICAgIHByaW50ZigiJXMiLG1lbSk7DQogICAgICAgIH0gZWxzZSB7
DQogICAgICAgICAgICBicmVhazsNCiAgICAgICAgfQ0KICAgIH0gd2hpbGUgKDEpOw0KDQogICAg
bGlic3NoMl9zZnRwX2Nsb3NlKHNmdHBfaGFuZGxlKTsNCiAgICBsaWJzc2gyX3NmdHBfc2h1dGRv
d24oc2Z0cF9zZXNzaW9uKTsNCg0KICBzaHV0ZG93bjoNCg0KICAgIGxpYnNzaDJfc2Vzc2lvbl9k
aXNjb25uZWN0KHNlc3Npb24sICJOb3JtYWwgU2h1dGRvd24sIFRoYW5rIHlvdSBmb3IgcGxheWlu
ZyIpOw0KICAgIGxpYnNzaDJfc2Vzc2lvbl9mcmVlKHNlc3Npb24pOw0KDQojaWZkZWYgV0lOMzIN
CiAgICBjbG9zZXNvY2tldChzb2NrKTsNCiNlbHNlDQogICAgY2xvc2Uoc29jayk7DQojZW5kaWYN
CiAgICBmcHJpbnRmKHN0ZGVyciwgImFsbCBkb25lXG4iKTsNCg0KICAgIGxpYnNzaDJfZXhpdCgp
Ow0KDQogICAgcmV0dXJuIDA7DQp9DQo=
--000e0cd2deee1aaada049170b752
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

--000e0cd2deee1aaada049170b752--

From libssh2-devel-bounces@cool.haxx.se  Thu Sep 30 05:16:28 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8U3GBWb005041;
	Thu, 30 Sep 2010 05:16:25 +0200
Received: from earth.stuge.se (earth.stuge.se [213.88.146.15])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8U3G9fA005021
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
	for <libssh2-devel@cool.haxx.se>; Thu, 30 Sep 2010 05:16:09 +0200
Received: (qmail 19523 invoked from network); 30 Sep 2010 03:16:07 -0000
Received: from unknown (HELO earth.stuge.se) (127.0.0.1)
	by localhost with SMTP; 30 Sep 2010 03:16:07 -0000
MIME-Version: 1.0
From: "libssh2 Trac" <trac@libssh2.stuge.se>
X-Trac-Version: 0.12b1
Precedence: bulk
Cc: libssh2-devel@cool.haxx.se
Auto-Submitted: auto-generated
X-Mailer: Trac 0.12b1, by Edgewall Software
X-Trac-Project: libssh2
Date: Thu, 30 Sep 2010 03:16:07 -0000
X-URL: http://trac.libssh2.org/
Subject: [libssh2] #187: Unable to connect to SFTP server using SSH-2.0-SSHD
X-Trac-Ticket-URL: http://trac.libssh2.org/ticket/187
Message-ID: <047.ff473ed169991c7f4a9e3fa703b14621@libssh2.stuge.se>
X-Trac-Ticket-ID: 187
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Thu, 30 Sep 2010 05:16:28 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Thu, 30 Sep 2010 05:16:09 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Reply-To: trac@libssh2.stuge.se,
        libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

#187: Unable to connect to SFTP server using SSH-2.0-SSHD
-------------------------+--------------------------------------------------
 Reporter:  sriramswamy  |       Owner:       
     Type:  defect       |      Status:  new  
 Priority:  blocker      |   Milestone:  1.2.7
Component:  SFTP         |     Version:  1.2.7
 Keywords:               |      Blocks:       
Blocked By:               |  
-------------------------+--------------------------------------------------
 Hi,

 I am using libssh2-1.2.7 in WINDOWS and try to connect to a server that is
 using SSH-2.0-SSHD.
 I am trying the same sftp.c to fetch a file from the server and am getting
 an error - "Unable to send KEX init message"
 Find attached the trace logs and the code. Please help!!!!

 -Sriram

-- 
Ticket URL: <http://trac.libssh2.org/ticket/187>
libssh2 <http://trac.libssh2.org/>
C library for writing portable SSH2 clients
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

From libssh2-devel-bounces@cool.haxx.se  Thu Sep 30 23:41:07 2010
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from giant.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id o8ULeT5M018069;
	Thu, 30 Sep 2010 23:41:04 +0200
Received: from giant.haxx.se (giant.haxx.se [80.67.6.50])
	by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with ESMTP id
	o8ULeSRf018062
	for <libssh2-devel@cool.haxx.se>; Thu, 30 Sep 2010 23:40:28 +0200
Date: Thu, 30 Sep 2010 23:40:28 +0200 (CEST)
From: Daniel Stenberg <daniel@haxx.se>
X-X-Sender: dast@giant.haxx.se
To: libssh2 development <libssh2-devel@cool.haxx.se>
Subject: Re: Unable to connect to SFTP server using SSH-2.0-SSHD
In-Reply-To: <AANLkTikYY1xRfDnGet498uZB2Vb_jLGcmGTqZtbW1xpU@mail.gmail.com>
Message-ID: <alpine.DEB.2.00.1009302339090.499@tvnag.unkk.fr>
References: <AANLkTi=UhWvoEqBZ5izQ12_pEnsgmQrON3nZ_zFOjKYn@mail.gmail.com>
	<AANLkTikYY1xRfDnGet498uZB2Vb_jLGcmGTqZtbW1xpU@mail.gmail.com>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
X-fromdanielhimself: yes
MIME-Version: 1.0
X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [127.0.0.1]); Thu, 30 Sep 2010 23:41:07 +0200 (CEST)
X-Greylist: Default is to whitelist mail, not delayed by milter-greylist-4.3.5
	(giant.haxx.se [80.67.6.50]);
	Thu, 30 Sep 2010 23:40:28 +0200 (CEST)
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.13
Precedence: list
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <http://cool.haxx.se/cgi-bin/mailman/options/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=unsubscribe>
List-Archive: <http://cool.haxx.se/pipermail/libssh2-devel>
List-Post: <mailto:libssh2-devel@cool.haxx.se>
List-Help: <mailto:libssh2-devel-request@cool.haxx.se?subject=help>
List-Subscribe: <http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
	<mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Sender: libssh2-devel-bounces@cool.haxx.se
Errors-To: libssh2-devel-bounces@cool.haxx.se

On Wed, 29 Sep 2010, Sriram Swaminathan wrote:

> const char *keyfile1="~/.ssh/id_rsa.pub";
> const char *keyfile2="~/.ssh/id_rsa";

Can your system really convert "~/" in the file name to look relative your 
home directory? That's usually a feature of the shell, not the open or fopen 
calls...

-- 

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

