RE: simple ssl client - error in reading from buffer

2006-12-13 Thread David Schwartz
> 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 wa

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

RE: simple ssl client - error in reading from buffer

2006-12-13 Thread David Schwartz
> I have a problem in the section (Read in the response). For my > futher work i need to know if in the internal openssl buffer are > still some data. I thing that best method to recognize it will be > the BIO_pending(), but this function gives me everytime number 0, > that there aren`t any data.

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