Re: libssh multi-threading issue

2014-04-16 Thread Mike Jones
On 4/16/2014 1:51 AM, ZhangAnne wrote: > Hi, > > I am implementing a shared library, and met the threading issue when > the program calls my library and executes multiple threads in > parallel. Since my lib is being called by other program, I cannot > initialize the threading outside of any threadi

building libssh for ios

2014-04-16 Thread Daniel Kroker
Hello, i want to build libssh for iOS but cmake fails. the iOS tolchain is in the attachment. Have someone try to build libssh for ios? command: cmake -DCMAKE_TOOLCHAIN_FILE=/Users/da/Downloads/ios.toolchain.cmake -DOPENSSL_LIBRARIES=/Users/da/openssl-ios/lib/ -DOPENSSL_INCLUDE_DIRS=/Users/da/o

Fwd: Optimization of log levels - libSSH

2014-04-16 Thread Gangadhar Sandrani
Hi All, We have registered callbacks for fetching the debug/trace from libssh in our server side interface code, and for configuring the log level we use the API ssh_set_log_level(SSH_LOG_LEVEL). When the log level is set to 1 and 2 we observe all the warnings and protocol information would b

Re: building libssh for ios

2014-04-16 Thread Andreas Schneider
On Wednesday 16 April 2014 13:11:23 Daniel Kroker wrote: > Hello, > > i want to build libssh for iOS but cmake fails. > > the iOS tolchain is in the attachment. Have someone try to build libssh for > ios? > > command: > > cmake -DCMAKE_TOOLCHAIN_FILE=/Users/da/Downloads/ios.toolchain.cmake > -D

Re: libssh multi-threading issue

2014-04-16 Thread Anne Zhang
Hi Mike, Thanks for the reply. Unfortunately, I am only implementing an .so file and have no access to the main program. I understand ssh_init() would solve the problem but my library is being called within a thread and I cannot change what's in the main/original thread. Look forward to additiona

Re: libssh multi-threading issue

2014-04-16 Thread Aris Adamantiadis
Hi Anne, There's an easy solution: before every ssh_connect, put an initialization procedure protected by a mutex. This is not optimal (because every new connection will have to lock+unlock a mutex) but you are guaranteed that ssh_init gets called only once. Pseudocode: do_my_connect(){ static in

Re: Request to use ssh crypto for another project. Is this possible?

2014-04-16 Thread Aris Adamantiadis
I have absolutely no idea of what you're going to do but that sounds cool. To answer your question, yes it's probably possible, everything is possible with a bit of work. Aris Le 10/04/14 04:07, Simon Jackson a écrit : > I'm going to need repeated encryption of one crypto block on the local > mac

Re: libssh multi-threading issue

2014-04-16 Thread Dustin Oprea
On Wed, Apr 16, 2014 at 2:26 PM, Aris Adamantiadis wrote: > Hi Anne, > > There's an easy solution: before every ssh_connect, put an > initialization procedure protected by a mutex. This is not optimal > (because every new connection will have to lock+unlock a mutex) but you > are guaranteed that s

What is "WITH_GSSAPI" and "WITH_PCAP" ?

2014-04-16 Thread Zvi Vered
Hello, I'm trying to port libssh to vxWorks 6.x Where can I read what will be omitted in the library in case: -DWITH_GSSAPI:BOOL=OFF -DWITH_PCAP:BOOL=OFF Thanks, Zvika

Re: What is "WITH_GSSAPI" and "WITH_PCAP" ?

2014-04-16 Thread Andreas Schneider
On Wednesday 16 April 2014 22:53:33 Zvi Vered wrote: > Hello, Hi, > I'm trying to port libssh to vxWorks 6.x > > Where can I read what will be omitted in the library in case: > > -DWITH_GSSAPI:BOOL=OFF this is Kerberos, you will find more details at http://tools.ietf.org/html/rfc4462 > > -D

Re: libssh multi-threading issue

2014-04-16 Thread Anne Zhang
Hi Aris, Thanks so much for the reply. It works in my Linux environment! I tried: static int initialized=0; static pthread_mutex_t mutex1 = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock(&mutex1); if (!initialized){ ssh_threads_set_callbacks(ssh_threads_get_pthread()); ssh_init(); ini