Boost logo

Boost :

From: Scott (cheesy4poofs_at_[hidden])
Date: 2006-09-28 13:33:56


Hi Chris,

> > When the error occurs, here's the values I'm seeing going from
> > top to bottom:
> >
> > int rc = primitive_( session_ ); // -1
> > int sys_error_code = (int)ERR_get_error(); // 0
> > bool is_operation_done = (rc > 0); // false
> > int error_code = !is_operation_done ? // 5
> > bool is_read_needed = (error_code == SSL_ERROR_WANT_READ);
> > // false
> > bool is_write_needed = (error_code == SSL_ERROR_WANT_WRITE
> > || // false
> > bool is_shut_down_received = // false
> > bool is_shut_down_sent = // false
>
> OK, this is not quite what I expected :( I had a skim through
> the openssl source but couldn't find why using the openssl API
> in non-blocking mode should return SSL_ERROR_SYSCALL.
>
> It's a bit hard to know where to go next without access to a
> reproducible test case. You might try adding some debug tracing
> that prints the amount of data that passed in and out of the
> BIO_write and BIO_read calls to see if anything looks wrong.

I have attached a simple server/client SSL program that demonstrates the
"Access is denied" error on windows. The client eventually gets the error.
It's quite possible I'm misusing the ASIO library, so please point out any
errors you see.

In the client, I have 2 threads. The main thread is the one that sends
random messages to the server. The other thread handles all incoming
responses and prints out the number of bytes received. Both threads share
the same io_service. It is my understanding from the docs that multiple
threads can all share an io_service, but please let me know if the code is
incorrect.

Thanks,
Scott





Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk