Operation not permitted on SSL_Write() - Openssl

This is a discussion on Operation not permitted on SSL_Write() - Openssl ; Hello, I'm using non-blicking sockets with an event-reporting mechanism (epoll() on linux, kqueue() on freeBSD and select() elsewhere). When I try and send bigger amount of data (eg: a file) via a connection via OpenSSL, I eventually get "Operation not ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Operation not permitted on SSL_Write()

  1. Operation not permitted on SSL_Write()

    Hello, I'm using non-blicking sockets with an event-reporting mechanism
    (epoll() on linux, kqueue() on freeBSD and select() elsewhere). When I
    try and send bigger amount of data (eg: a file) via a connection via
    OpenSSL, I eventually get "Operation not permitted" error on SSL_Write().

    It always happens after I get a SSL_ERROR_WANT_WRITE first. After that I
    set the socket to "wait for epoll() to report that I can write again"
    and wait for it. Epoll tells me that I can write but I get the not
    permitted error after that.

    Does OpenSSL return this error on repeated non-blocking SSL_Write when
    the buffers are full? I'm currently trying to find out if there's an
    error in my state-machine logic but I'd like to know if the permission
    error could result from such.

    Thanks

    Ales Katona
    __________________________________________________ ____________________
    OpenSSL Project http://www.openssl.org
    User Support Mailing List openssl-users@openssl.org
    Automated List Manager majordomo@openssl.org


  2. Re: Operation not permitted on SSL_Write()

    I've found out that it's related to how SSL_Write() expects the same
    buffer pointer after an SSL_ERROR_WANT_WRITE occurs.

    I also found out that this can be avoided by issuing a SSL_ctrl() which
    I tried, but now I get corrupted data from certain point.

    How EXACTLY is SSL_Write in non-blocking mode different from
    non-blocking write()/send()?

    If it fails with SSL_ERROR_WANT_WRITE does it expect that the next call
    the buffer will be 100% same? Can there be additional data added to the
    buffer in between?

    Ales
    __________________________________________________ ____________________
    OpenSSL Project http://www.openssl.org
    User Support Mailing List openssl-users@openssl.org
    Automated List Manager majordomo@openssl.org


  3. Re: Operation not permitted on SSL_Write()

    Discard, while originally the problem was with a moving buffer, the
    later trouble I had were my own bugs (SMTP CRLF line break algorithm had
    problems).

    Ales
    __________________________________________________ ____________________
    OpenSSL Project http://www.openssl.org
    User Support Mailing List openssl-users@openssl.org
    Automated List Manager majordomo@openssl.org


+ Reply to Thread