From libssh2-devel-bounces@cool.haxx.se  Mon May  8 00:30:42 2017
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from www.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTP id v47MSmAf027843;
	Mon, 8 May 2017 00:30:32 +0200
Received: from mail-wr0-x22a.google.com (mail-wr0-x22a.google.com
 [IPv6:2a00:1450:400c:c0c:0:0:0:22a])
 by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTPS id v47MSkfS027795
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT)
 for <libssh2-devel@cool.haxx.se>; Mon, 8 May 2017 00:28:47 +0200
Received: by mail-wr0-x22a.google.com with SMTP id z52so30445686wrc.2
 for <libssh2-devel@cool.haxx.se>; Sun, 07 May 2017 15:28:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:from:date:message-id:subject:to;
 bh=7m2BECltqUcDQhsJU6dQtjbMMKVdJRkLB1FiMNqyx68=;
 b=b+pssg2HOW4EFmRgft+6aPBmf499JhwLEn+rWawzwgqWjAZm4mVP/HspjO0OvvwTmW
 A6rn05jYpcVt8wL5HbnKsQyTDoDE4tOXBeXuwUJRQ8ubAT8/zBfox0PjVv6fYsqzH2we
 utHpjY/KI9rO6YMGoCHVZA/KEGNS16vHjPiUi0DT9XTd+OFNrQjgBuPKJYkr/WUkytGj
 i1oKsnBkyLNjeeX876fNh8EeyvZ22hjIV6OUo/5mVOrQYp/xcrTd5MbcY1CERxN4mKHZ
 K+BF8wChOUQUVohJlitpaWX9WRpd8kzkejNsbzN0ywv9Dd4/Ca/4RU8plVdZ5fwvgK8L
 7zQQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:from:date:message-id:subject:to;
 bh=7m2BECltqUcDQhsJU6dQtjbMMKVdJRkLB1FiMNqyx68=;
 b=NeTTlAPLXpBt8v3a8hEeRM4AuLVnBPDEqPyTaKA9VQYz6/xdlxjWZhHAVCT8uiTOMo
 UlRebiU1Z1n90zkrWT0tPXz7yh+exbRHcD+WU6iQBhM6piT8awnoTnv3JtecGV83vA36
 hbAttCLLy/XcXKHLpiI1AtjLBPgxxwJTt8PUpJFtfrDcZZ6B+xnOsYvWJHbmwILRJp/I
 3G8pZSw8v1YWWSw674FrJDE6mP9BXvXqeZ//c2yHC2vU/KIw7/aEt4MYv+0yoYF+lmKN
 8azwNden+5pJXDuyM7sD9y0Sa/3tY3aLdN146rl1beS5l/0/K24QB0fTkpyjqAhBxkCp
 JKcQ==
X-Gm-Message-State: AN3rC/4HJ8kmuMj/LXBWQXh3ZLTNM1+mpWp4/nRIpn7Jf6E3cG/+nQ2T
 9Xo18pcDRUq9YXEkWunlqQpZwLeAdK3Y
X-Received: by 10.223.153.181 with SMTP id y50mr36854248wrb.41.1494196123170; 
 Sun, 07 May 2017 15:28:43 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.28.22.196 with HTTP; Sun, 7 May 2017 15:28:42 -0700 (PDT)
Date: Sun, 7 May 2017 18:28:42 -0400
Message-ID: <CAGNmLEP2Crv__=OhrtsfmagvJ8_qwWg+op8r-7i87=6R3afGkQ@mail.gmail.com>
Subject: compiled version of libssh2 for windowns 32bit
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <https://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: <https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
 <mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
From: Toan Pham via libssh2-devel <libssh2-devel@cool.haxx.se>
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
Cc: Toan Pham <tpham3783@gmail.com>
Content-Type: multipart/mixed; boundary="===============1977281787=="
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: "libssh2-devel" <libssh2-devel-bounces@cool.haxx.se>

--===============1977281787==
Content-Type: multipart/alternative; boundary=f403045f58bc258035054ef6a545

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

Hi,

I am using an unknown version of libssh2 on windows 32bit.
libssh2_version(0) does not return anything so I do not know the exact
version, the windows shared library was given to me by a friend.....I guess
it is about 3 years old.

The problem that I am experiencing is that when I use libssh2 in qt timer
loop, often time, I would get error -41 while reading data from an active
channel.  If I were to put the nonblock function call
(libssh2_channel_read) in a event loop, not qtimer, everything would work
OK.  I am not sure if libssh2 is thread safe.  One post I read from
https://hackage.haskell.org/package/libssh2, says that libssh2 for windows
must be compiled with the -threaded option to make it useable in windows.
I've been pulling my hair over this issue because I really do not know if I
got a foobar version of libssh.dll.

Unfortunately, I do not have visual studio and do not want to go through
the process of compiling the library w/ mingw for windows.  I would like to
know if anyone here can send me the latest pre-compiled version of
libssh2.dll for win-32bit.  Or if you know why I got the -41 in windows,
please share.  BTW, the same application compiled for Linux-amd64 worked
fine.

thanks,

Toan

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

<div dir=3D"ltr"><div><div><div><div><div><div><br><br></div>Hi,<br><br></d=
iv>I am using an unknown version of libssh2 on windows 32bit.=C2=A0 libssh2=
_version(0) does not return anything so I do not know the exact version, th=
e windows shared library was given to me by a friend.....I guess it is abou=
t 3 years old.<br><br></div>The problem that I am experiencing is that when=
 I use libssh2 in qt timer loop, often time, I would get error -41 while re=
ading data from an active channel.=C2=A0 If I were to put the nonblock func=
tion call (libssh2_channel_read) in a event loop, not qtimer, everything wo=
uld work OK.=C2=A0 I am not sure if libssh2 is thread safe.=C2=A0 One post =
I read from <a href=3D"https://hackage.haskell.org/package/libssh2">https:/=
/hackage.haskell.org/package/libssh2</a>, says that libssh2 for windows mus=
t be compiled with the -threaded option to make it useable in windows.=C2=
=A0 I&#39;ve been pulling my hair over this issue because I really do not k=
now if I got a foobar version of libssh.dll.<br><br></div>Unfortunately, I =
do not have visual studio and do not want to go through the process of comp=
iling the library w/ mingw for windows.=C2=A0 I would like to know if anyon=
e here can send me the latest pre-compiled version of libssh2.dll for win-3=
2bit.=C2=A0 Or if you know why I got the -41 in windows, please share.=C2=
=A0 BTW, the same application compiled for Linux-amd64 worked fine.<br><br>=
</div>thanks,<br><br></div>Toan<br><div><div><div><div><br></div></div></di=
v></div></div>

--f403045f58bc258035054ef6a545--

--===============1977281787==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbGlic3NoMi1k
ZXZlbCBodHRwczovL2Nvb2wuaGF4eC5zZS9jZ2ktYmluL21haWxtYW4vbGlzdGluZm8vbGlic3No
Mi1kZXZlbAo=

--===============1977281787==--

From libssh2-devel-bounces@cool.haxx.se  Mon May  8 01:00:33 2017
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from www.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTP id v47MxMRh017359;
	Mon, 8 May 2017 01:00:30 +0200
Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com
 [IPv6:2a00:1450:400c:c09:0:0:0:230])
 by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTPS id v47MxKGG017278
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT)
 for <libssh2-devel@cool.haxx.se>; Mon, 8 May 2017 00:59:20 +0200
Received: by mail-wm0-x230.google.com with SMTP id m123so47004197wma.0
 for <libssh2-devel@cool.haxx.se>; Sun, 07 May 2017 15:59:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=mime-version:in-reply-to:references:from:date:message-id:subject:to;
 bh=qBjhxCNEIB++/xGp9c7D6F8ZnjHURbeUHLtofTYQFlQ=;
 b=CrpHCClwlghm2o32eaRAgpyQoeoRRVrG+Qq3bYVS8bgSG+r0/kF+UmsBncIv+DXu7E
 cKF9TpvQiQ496CAbNy7n1TTIVueF8CrmfOTGhBgpH9NGDnHWrnEqaeZk4Z3bK0o5OSpF
 L6Xs8+tNVIdXKxuQR5d4VHTKSC1EdhSLkTATpUUWuR4DkfUUYTx6DkHtNyEPTUKR3tDR
 2FOju/JqWphpq9gdFz47ZQDrCsqPrVlXP/fgbQd2Zw9z4myVQ3jKDS6UKS3lXFVdGAk0
 fZZeAUn9mF3VMuPDclWKodbJ1+OFZvpWJPt1ZQu7DQgxaksRlv243YHw+mv2dJ7FTIsb
 jtwg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:in-reply-to:references:from:date
 :message-id:subject:to;
 bh=qBjhxCNEIB++/xGp9c7D6F8ZnjHURbeUHLtofTYQFlQ=;
 b=bCYGaVlmNahpF9EDJs9sXk/IK7o4KyWUpLt/ENECh70imOnb5oTBU1a5PGgLsU6Cy+
 0ZXBUGP8JHwDDHxjSvCuO+DV+6dmm/Zq+S3B0d1OHBLEW8wjrjhdx8nnwgqADrxu7f+0
 xBWonR3h0Sj6aQTeeHiBss1iPAHk9m2enl3B85/2x8TXoyT2cFbq9JleZ+SrsuSHQFK+
 MLtyvUbrpDnteU66EIcpg+vPUcvPtMxKzDBYn6FKNUEbiEAScHza/aWYm76uTOy6/ivd
 B6p6QMCxBLZL/n0IVCDnYLKV1K2VsYheDzw768SrAy42uaLVFsmFPRnwcLn4WA/sHJYC
 5lpQ==
X-Gm-Message-State: AODbwcB5f5pOfS4zGQEoZ1TJcDtM8GfUJE7WL9uF06PAtCy0TCX83oga
 C/yh/9f9tZ4MuY9/BBaOLEfKC3EXGpm3
X-Received: by 10.28.170.135 with SMTP id t129mr1391668wme.128.1494197956762; 
 Sun, 07 May 2017 15:59:16 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.28.22.196 with HTTP; Sun, 7 May 2017 15:59:16 -0700 (PDT)
In-Reply-To: <CAGNmLEP2Crv__=OhrtsfmagvJ8_qwWg+op8r-7i87=6R3afGkQ@mail.gmail.com>
References: <CAGNmLEP2Crv__=OhrtsfmagvJ8_qwWg+op8r-7i87=6R3afGkQ@mail.gmail.com>
Date: Sun, 7 May 2017 18:59:16 -0400
Message-ID: <CAGNmLENYUSvtenhBZddx3MhEdXUYEdNODXES6Vqmv7PoMnr4Ow@mail.gmail.com>
Subject: Re: compiled version of libssh2 for windowns 32bit
To: libssh2 development <libssh2-devel@cool.haxx.se>
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <https://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: <https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
 <mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
From: Toan Pham via libssh2-devel <libssh2-devel@cool.haxx.se>
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
Cc: Toan Pham <tpham3783@gmail.com>
Content-Type: multipart/mixed; boundary="===============0594083532=="
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: "libssh2-devel" <libssh2-devel-bounces@cool.haxx.se>

--===============0594083532==
Content-Type: multipart/alternative; boundary=001a114424b86fe1cd054ef7129a

--001a114424b86fe1cd054ef7129a
Content-Type: text/plain; charset=UTF-8

Well, I found out the version of libssh2.dll I am using:  it is.

LIbssh2 version: 1.2.9-20110813


obviously, it is 5 years old.  Please let me know if you know of any bugfix
for error -41, since that version.

thanks,

TP

On Sun, May 7, 2017 at 6:28 PM, Toan Pham <tpham3783@gmail.com> wrote:

>
>
> Hi,
>
> I am using an unknown version of libssh2 on windows 32bit.
> libssh2_version(0) does not return anything so I do not know the exact
> version, the windows shared library was given to me by a friend.....I guess
> it is about 3 years old.
>
> The problem that I am experiencing is that when I use libssh2 in qt timer
> loop, often time, I would get error -41 while reading data from an active
> channel.  If I were to put the nonblock function call
> (libssh2_channel_read) in a event loop, not qtimer, everything would work
> OK.  I am not sure if libssh2 is thread safe.  One post I read from
> https://hackage.haskell.org/package/libssh2, says that libssh2 for
> windows must be compiled with the -threaded option to make it useable in
> windows.  I've been pulling my hair over this issue because I really do not
> know if I got a foobar version of libssh.dll.
>
> Unfortunately, I do not have visual studio and do not want to go through
> the process of compiling the library w/ mingw for windows.  I would like to
> know if anyone here can send me the latest pre-compiled version of
> libssh2.dll for win-32bit.  Or if you know why I got the -41 in windows,
> please share.  BTW, the same application compiled for Linux-amd64 worked
> fine.
>
> thanks,
>
> Toan
>
>

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

<div dir=3D"ltr"><div><div><div><div><br></div>Well, I found out the versio=
n of libssh2.dll I am using:=C2=A0 it is.<br><br>LIbssh2 version: 1.2.9-201=
10813<br><br><br></div>obviously, it is 5 years old.=C2=A0 Please let me kn=
ow if you know of any bugfix for error -41, since that version.<br><br></di=
v>thanks,<br><br></div>TP<br></div><div class=3D"gmail_extra"><br><div clas=
s=3D"gmail_quote">On Sun, May 7, 2017 at 6:28 PM, Toan Pham <span dir=3D"lt=
r">&lt;<a href=3D"mailto:tpham3783@gmail.com" target=3D"_blank">tpham3783@g=
mail.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=
=3D"ltr"><div><div><div><div><div><div><br><br></div>Hi,<br><br></div>I am =
using an unknown version of libssh2 on windows 32bit.=C2=A0 libssh2_version=
(0) does not return anything so I do not know the exact version, the window=
s shared library was given to me by a friend.....I guess it is about 3 year=
s old.<br><br></div>The problem that I am experiencing is that when I use l=
ibssh2 in qt timer loop, often time, I would get error -41 while reading da=
ta from an active channel.=C2=A0 If I were to put the nonblock function cal=
l (libssh2_channel_read) in a event loop, not qtimer, everything would work=
 OK.=C2=A0 I am not sure if libssh2 is thread safe.=C2=A0 One post I read f=
rom <a href=3D"https://hackage.haskell.org/package/libssh2" target=3D"_blan=
k">https://hackage.haskell.org/<wbr>package/libssh2</a>, says that libssh2 =
for windows must be compiled with the -threaded option to make it useable i=
n windows.=C2=A0 I&#39;ve been pulling my hair over this issue because I re=
ally do not know if I got a foobar version of libssh.dll.<br><br></div>Unfo=
rtunately, I do not have visual studio and do not want to go through the pr=
ocess of compiling the library w/ mingw for windows.=C2=A0 I would like to =
know if anyone here can send me the latest pre-compiled version of libssh2.=
dll for win-32bit.=C2=A0 Or if you know why I got the -41 in windows, pleas=
e share.=C2=A0 BTW, the same application compiled for Linux-amd64 worked fi=
ne.<br><br></div>thanks,<br><br></div>Toan<br><div><div><div><div><br></div=
></div></div></div></div>
</blockquote></div><br></div>

--001a114424b86fe1cd054ef7129a--

--===============0594083532==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbGlic3NoMi1k
ZXZlbCBodHRwczovL2Nvb2wuaGF4eC5zZS9jZ2ktYmluL21haWxtYW4vbGlzdGluZm8vbGlic3No
Mi1kZXZlbAo=

--===============0594083532==--

From libssh2-devel-bounces@cool.haxx.se  Mon May  8 09:39:51 2017
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from www.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTP id v487dMXf025159;
	Mon, 8 May 2017 09:39:43 +0200
Received: from blaine.gmane.org ([195.159.176.226])
 by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTPS id v487dKYr024988
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT)
 for <libssh2-devel@cool.haxx.se>; Mon, 8 May 2017 09:39:20 +0200
Received: from list by blaine.gmane.org with local (Exim 4.84_2)
 (envelope-from <gnslg-libssh2-devel-2@m.gmane.org>)
 id 1d7dGE-0007N5-MX
 for libssh2-devel@cool.haxx.se; Mon, 08 May 2017 09:39:14 +0200
X-Injected-Via-Gmane: http://gmane.org/
To: libssh2-devel@cool.haxx.se
From: Jan Ehrhardt <phpdev@ehrhardt.nl>
Subject: Re: compiled version of libssh2 for windowns 32bit
Date: Mon, 08 May 2017 09:39:13 +0200
Lines: 13
Message-ID: <d280hch55m21goo8qd1l0p09ocmmlbojcs@4ax.com>
References: <CAGNmLEP2Crv__=OhrtsfmagvJ8_qwWg+op8r-7i87=6R3afGkQ@mail.gmail.com>
 <CAGNmLEP2Crv__=OhrtsfmagvJ8_qwWg+op8r-7i87=6R3afGkQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
 <CAGNmLENYUSvtenhBZddx3MhEdXUYEdNODXES6Vqmv7PoMnr4Ow@mail.gmail.com>
Mime-Version: 1.0
X-Complaints-To: usenet@blaine.gmane.org
X-Newsreader: Forte Agent 3.3/32.846
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <https://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: <https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
 <mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
Content-Type: text/plain; charset="utf-8"
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: "libssh2-devel" <libssh2-devel-bounces@cool.haxx.se>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by giant.haxx.se id v487dMXf025159

Toan Pham via libssh2-devel in gmane.network.ssh.libssh2.devel (Sun, 7
May 2017 18:59:16 -0400):
>Well, I found out the version of libssh2.dll I am using:  it is.
>
>LIbssh2 version: 1.2.9-20110813
>
>obviously, it is 5 years old.  Please let me know if you know of any bugfix
>for error -41, since that version.

You could try your luck with a more recent VC9 version:
http://windows.php.net/downloads/php-sdk/deps/archives/vc9/x86/
-- 
Jan

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

From libssh2-devel-bounces@cool.haxx.se  Sat May 13 17:03:38 2017
Return-Path: <libssh2-devel-bounces@cool.haxx.se>
Received: from www.haxx.se (localhost.localdomain [127.0.0.1])
	by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTP id v4DF2xj7013532;
	Sat, 13 May 2017 17:03:29 +0200
Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com
 [IPv6:2a00:1450:400c:c09:0:0:0:22f])
 by giant.haxx.se (8.15.2/8.15.2/Debian-4) with ESMTPS id v4DF2vS7013519
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT)
 for <libssh2-devel@cool.haxx.se>; Sat, 13 May 2017 17:02:57 +0200
Received: by mail-wm0-x22f.google.com with SMTP id v15so7079948wmv.1
 for <libssh2-devel@cool.haxx.se>; Sat, 13 May 2017 08:02:58 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:content-transfer-encoding:mime-version:subject:message-id:date
 :to; bh=FV+C7gcHuX8GnPbKLho4pSeIQNmnyhqBVUmkIrZlDEQ=;
 b=Vd71tXHPWyQ4phS/h0nsxyZ1L+LN/oknzPMhyMd91GCSEWOt0giBV8pjixbTPJ1G3t
 89+XLgFppeuW0dNQem+J2xhAmXCZfORwwm/ve7RxW5CmCroMfJVpa1E3xipGGcXro8Cc
 bD2JGqGlNPlwarfGH6viuquFz/seRA5BR0PlU5mFq9byc2eJtLwnZhL4JfTTVXAg5Hlc
 fM8++CZ2ucdlHjnUeFuuX6oePD/DQjliot33Ax/zdsg265KH1TdlNozsEmDiW/7mQi0L
 Vt/ai1Hqyzkal7fyRSs7kLNqmfXrQw4zM7N5K1jjl6IkoWE9FXtAG28rmz9fYR6nL1cZ
 XObQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:content-transfer-encoding:mime-version
 :subject:message-id:date:to;
 bh=FV+C7gcHuX8GnPbKLho4pSeIQNmnyhqBVUmkIrZlDEQ=;
 b=qTnHYG4kP8b8qb5cpfk2wT8byE3Q8ovdmb0VCKGPbQeePNwobx6k8Z0rWtyRFDTm74
 NaDKwXCK9Rpc5ulyOckNnAnAMkTWTt6/k7jgab8W1Ta8Kk20BrEQye9BH3veeU5dWd+J
 3S37sSplJjBrweooNJBMSBEpejQM+UmBrEC+vTQ0j2JPL84+h9LKxbALDiG6yi2/1Bgf
 7ShzxkRapczx7u/YxcQIALOKW3odIBmuIPFpzsZjeCmc1f53MHjS609Nk7XD1J2Se6sT
 iPrSDc1mNseF8J8v358Ltd+q0qMY+6A2kMy8z/4RYQHn/2jYr/CV+5ydZF4SfZxIhgze
 l+Zw==
X-Gm-Message-State: AODbwcCeLMTCazvPaauItgqqmQXaHE4GdUs3vgM/ajwu+2/IeTBBpOCH
 tQxSTP5lvrz94egEu18=
X-Received: by 10.28.196.73 with SMTP id u70mr5850477wmf.135.1494687773188;
 Sat, 13 May 2017 08:02:53 -0700 (PDT)
Received: from [192.168.0.11] (lns-bzn-44-82-249-208-102.adsl.proxad.net.
 [82.249.208.102])
 by smtp.gmail.com with ESMTPSA id 202sm5853904wmy.25.2017.05.13.08.02.52
 for <libssh2-devel@cool.haxx.se>
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Sat, 13 May 2017 08:02:52 -0700 (PDT)
Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\))
Subject: libssh2_session_init_ex memory allocation functions
Message-Id: <9C152A85-67D1-4B49-B84E-932BF4C1A839@gmail.com>
Date: Sat, 13 May 2017 17:02:51 +0200
To: libssh2-devel@cool.haxx.se
X-Mailer: Apple Mail (2.3259)
X-MIME-Autoconverted: from quoted-printable to 8bit by giant.haxx.se id
 v4DF2vS7013519
X-BeenThere: libssh2-devel@cool.haxx.se
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: libssh2 development <libssh2-devel.cool.haxx.se>
List-Unsubscribe: <https://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: <https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel>, 
 <mailto:libssh2-devel-request@cool.haxx.se?subject=subscribe>
From: Etienne Samson via libssh2-devel <libssh2-devel@cool.haxx.se>
Reply-To: libssh2 development <libssh2-devel@cool.haxx.se>
Cc: Etienne Samson <samson.etienne@gmail.com>
Content-Type: text/plain; charset="utf-8"
Errors-To: libssh2-devel-bounces@cool.haxx.se
Sender: "libssh2-devel" <libssh2-devel-bounces@cool.haxx.se>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from base64 to 8bit by giant.haxx.se id v4DF2xj7013532

Hi libssh2-devel !

I've been working on and off on how libssh2 manages its crypto backends (the end goal being native support for Apple's CommonCrypto), so I started hacking on having a "real" API instead of a bunch of `#define`s (I have a branch that removes the duplicated DH hashing in kex.c thanks to that).

`libssh2_session_init_ex` takes function pointers for memory-management, but there are many offenders (OpenSSL has 7, os400qc3 has 15, WinCNG has 23, you can check using regex `((m|clre)alloc|\sfree)\(`), and this doesn't account for "indirect" uses (the mbedTLS backend uses its own functions, I'd wager most of OpenSSL `*_new` functions do too).

Hence my question is, should I strive to preserve those function pointers and fix those offenders, or would it be acceptable to deprecate those in favor of having more direct `libssh2_(malloc|calloc|realloc|free)` global functions that don't need a `LIBSSH2_SESSION` struct (which is my current problem) ?

I do realize that maybe embedded users of libssh2 have a use for those, or that having those new functions as globals is not a change we want to make. Given the way the current backend macro-API is generally modeled after the OpenSSL quirks^W API, and that its recent incarnations seems to be doing away with having stack-allocation, I'd prefer not to preserve stack-allocating things if it's going away.

Opinions ?

Regards,
Etienne Samson
--
samson.etienne@gmail.com


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

