Re: RAND_load_file question

2008-02-18 Thread Alessandro Pivi - GLOBALcom engineering
Please give me some feedback. Alessandro Pivi - GLOBALcom engineering ha scritto: Hi, I am making an application that makes SSL connections. The problem is that my application will run in a chrooted environment, and will not be able to access /dev/urandom, but I have a function available

Re: RAND_load_file question

2008-02-18 Thread Alessandro Pivi - GLOBALcom engineering
:-) you are right, I didn't know about RAND_add. I will use RAND_seed because my data input is a TRNG (true random number generator), so I'm confident I don't have to worry about entropy. Thanks David Schwartz ha scritto: Please give me some feedback. Why don't you just

Re: possible SSL_write bug

2008-02-14 Thread Alessandro Pivi - GLOBALcom engineering
You are right, it is just a signal I should ignore. Now it works perfectly. Maybe the fact that the SSL_write might rise a SIGPIPE should be in the documentation, because it happens only in particular situations (2 writes in a row with connection closed remotely), and it might cause

RAND_load_file question

2008-02-14 Thread Alessandro Pivi - GLOBALcom engineering
Hi, I am making an application that makes SSL connections. The problem is that my application will run in a chrooted environment, and will not be able to access /dev/urandom, but I have a function available which can read random values from a TRNG. I would like to know if my approach to the

Re: possible SSL_write bug

2008-02-13 Thread Alessandro Pivi - GLOBALcom engineering
Sorry for my bad english, it crashes, it doesn't hang. It is not true I don't handle errors. The SSL_write always returns a positive value (the number of bytes I'm trying to write), which means there has not been an error. The SSL_get_error called with a positive value always returns

Re: possible SSL_write bug

2008-02-13 Thread Alessandro Pivi - GLOBALcom engineering
This is what you requested: (gdb) run Starting program: /home/develop/test/bin/sslTest h:127.0.0.1 port:16001 SSL Connection opened start op w: 7 start op w: 7 start op w: 7 start op w: 7 start op w: 7 start op w: 7 start op Program received signal SIGPIPE, Broken pipe. 0x4011f41e in write

Re: possible SSL_write bug

2008-02-12 Thread Alessandro Pivi - GLOBALcom engineering
Hi, I found out that if I keep calling SSL_write, if the connection is closed remotely (killing stunnel), my application hangs. I made some tests, and saw that the error happens only if I keep calling SSL_write. The first SSL_write after closing the connection returns a positive value, as if

Re: possible SSL_write bug

2008-02-11 Thread Alessandro Pivi - GLOBALcom engineering
Hi, I made more tests, I even adapted sample code from samples I got in the web, and I always have the same result. If I close stunnel, the next SSL_write will return a positive value, as if everything is ok, the second causes sudden application termination. Could anybody please verify this

possible SSL_write bug

2008-02-06 Thread Alessandro Pivi - GLOBALcom engineering
Hi, I made a program that connects to a stunnel server. I am able to connect to the server, read, write, with no problems. The problem is that if I close the stunnel, I can handle the error correctly if I make an SSL_read, but not if I make an SSL_write. The SSL_write returns a positive value

Sample code to connect to stunnel server

2008-02-04 Thread Alessandro Pivi - GLOBALcom engineering
Hi, I need to make an SSL connectione between a client and a server application, both developed by me. On the server side I am going to use stunnel, while on the client side I can't use stunnel, I must use the ssl library. I tried to write the code to do it, but I can't connect. This is the

Re: Sample code to connect to stunnel server

2008-02-04 Thread Alessandro Pivi - GLOBALcom engineering
You are right, now it works :-) The stunnel should have been the server, but was configured as client. Thankyou for your help. [EMAIL PROTECTED] ha scritto: Hello, I need to make an SSL connectione between a client and a server application, both developed by me. On the server