Re: Interleaving SSL_write() and SSL_read()

2013-09-19 Thread James Marshall
My understanding is that yes, on that given socket, you have to do only what it needs according to the error code. In this case, SSL_ERROR_WANT_WRITE indicates you should select on write and try SSL_write() again before doing an SSL_read() on that socket. Of course, you can read and write on othe

Re: simple https client application

2013-09-18 Thread James Marshall
Yes, very possible. What language are you using? I use Perl, and there's a CPAN module called Net::SSLeay that provides Perl wrappers for all the OpenSSL functions. That module also includes a simple example client, which you can see at http://search.cpan.org/~mikem/Net-SSLeay-1.55/lib/Net/SSLea

Re: simple https server using openssl

2013-05-18 Thread James Marshall
Not clear if you need to learn HTTP, but a quick tutorial is at http://www.jmarshall.com/easy/http/ . It covers the requirements of writing compliant clients and servers. James On Fri, May 17, 2013 at 11:34 PM, Indtiny s wrote: > Hi Dave, > I do not need to handle all of HTTP stuffs , In my r

Re: OpenSSL wikibook

2013-02-02 Thread James Marshall
I think a good wiki for OpenSSL would be great! I had some trouble getting non-blocking IO to work-- the details were all there, but spread across many pages. So I put together this, which lists how to handle various return codes for various non-blocking calls: http://jmarshall.com/wiki/bin/view

Tables for handling various non-blocking I/O errors

2012-08-22 Thread James Marshall
For my own benefit and that of others, I made a page at http://jmarshall.com/stuff/handling-nbio-errors-in-openssl.html listing various error conditions after SSL_accept(), SSL_connect(), SSL_read(), SSL_write(), and SSL_shutdown(), all on *non-blocking* sockets. The tables show what to do after t

Meanings of various return codes with non-blocking I/O?

2012-08-09 Thread James Marshall
I'm trying to write a secure embedded HTTP server using OpenSSL. I'm using non-blocking I/O, and the main functions I'm using are SSL_accept(), SSL_read(), SSL_write(), and SSL_shutdown(). After each one, I want to handle all possible return codes, but I can't find docs that describe the meaning

A few questions about non-blocking I/O in a secure HTTP server

2012-07-06 Thread James Marshall
I'm trying to write a secure HTTP server with pipelining, using OpenSSL. It uses non-blocking I/O, and I have a few questions. The behavior I'm seeing is: I start the server on localhost, then I open a browser and try to access the server. The browser hangs with "Waiting for localhost..."; the f