Re: connection termiated (LINUX)

2007-09-19 Thread Milan Křápek
I thing I have finally found where the problem is. When the TCP connection is interrupted (pulling out network cable) there are some timeouts set for TCP connection. Defaultly on LINUX systems, theese configuration items, that sets TCP timeouts are in /proc/sys/net/ipv4/[tcp_keepalive_...]. I h

Re: connection termiated (LINUX)

2007-09-16 Thread Milan Křápek
Well I tryed to do recogniting of abort connection by select. But it does not help. I try to wait on the third set of select function that may contains the filedescriptors that determines sockets on which is reported some error. But it does not work too. It looks like the socket is ok. Why I thi

connection termiated (LINUX)

2007-09-16 Thread Milan Křápek
Hi, I have problem. I am creating client application that send to server some data via TCP or TLS protocol. For both the TCP and TLS I use the openssl library. I am using unblocking BIO. And I have this problem with recognizing if connection is aborted. I am trying to read from bio e

Using more libraries (poco, libcurl) that uses OpenSSL

2007-08-15 Thread Milan Křápek
Hi, I am workning on client/server application that transfers data by HTTPS. For client I use libcurl library and for server I use Poco library. Both using OpenSSL. But I have some problems using classes that contains client and server. It allways fails in places I used those libraries using

Re: problem with connection under win32

2007-02-22 Thread Milan Křápek
Thanks for advice. Can you just give me here link to this exmaple, or copy this, I cant find it. I go through the ocsp application in the latest release of OpenSSL, but I did not find there anything usefull. Thanks __ OpenSSL Pr

problem with connection under win32

2007-02-22 Thread Milan Křápek
Hi, In my project I try to set up TCP connection. It works fine on Unix systems, but when I try it on Windows I have problem. For connecting I use the non blocking BIO. Here is part of the code I use: BIO_set_nbio (bio,1); int rc = -1; while (rc <= 0){ rc = BIO_do_connect(bio); if (rc<=0){

Bio - error messages

2007-02-19 Thread Milan Křápek
Hi, in my openssl project I must be able to create TCP or TCP/TLS connection. When I connect only with TCP protocol, I do it with BIO_do_connect. Sometimes my connection is terminated. And I need a little bit more information what happend. I use this code rc = BIO_write(bio, message.c_str() ,

confused with BIO_set_nbio

2007-02-15 Thread Milan Křápek
I use openssl with TCP and TCP/TLS connection. I send a message to server and than I wait for response on select() function. I know, that sometimes I try to read, when there are no data on SSL buffer. I thought, that I must use the BIO_set_nbio to activate the non-blocking I/O operation, becaus

Is connection active

2007-02-14 Thread Milan Křápek
Hi I have problem, Is there any function in Openssl, that says me, that connection is active?? I create a new TCP connection with BIO_do_connect, it returns me, that connection was established. Than I make some another things in my program, after a while a send through this connection some dat

BIO_read(), SSL_read(), return values

2007-02-12 Thread Milan Křápek
. I use SSL_get_error function to determine, what hapen in reading, but I havent find what error code it returns me, when I read no data? Will it be SSL_ERROR_NONE or SSL_ERROR_ZERO_RETURN? I apologize for my English. Thanks for answer. Milan Křápek

SSL_ERROR_WANT ...

2007-01-26 Thread Milan Křápek
Hi, I need to explain some thing about this errors. I`m not good at english and I`m worried about misunderstanding. I have multithread system. Some threads are writing to BIOs and one is waiting on select function and read the responses of servers. For this, I must use a non blocking bio. And I`

RE: simple ssl client - error in reading from buffer

2006-12-13 Thread Milan Křápek
I`m confused with it. Have this situation. I send a request to server. And the server answer me. The lenght of servers answer is 10240. I wait some time until the server sends all data. Well now i have in buffer 10240b of data, that are avaiable to read. I use the BIO_read(bio, myOutputBuffer,

RE: simple ssl client - error in reading from buffer

2006-12-13 Thread Milan Křápek
Oh I see, I used wrong function. All I want is to know if I have in buffer some another data to read. In final step I want to have client that have e.g. 10 connections to several servers. I want to guard with function select() the file descriptors. And when select() awakes my thread i want to re

simple ssl client - error in reading from buffer

2006-12-13 Thread Milan Křápek
I try to learn how to work with Opensll library. I make this simple client #include #include #include #include int main() { /* Define varialbles */ SSL * ssl; SSL_CTX * ctx; X509 * server_cert; int p,err; char * request = "GET / HTTP/1.1\x0D\x0AHost: www.verisign.com