SSL_write and SSL_read - Openssl

This is a discussion on SSL_write and SSL_read - Openssl ; This is a multi-part message in MIME format. ------_=_NextPart_001_01C77B7A.B6057167 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Friends, =20 I've an application which supports TLS communication in which, socket descriptors are handled in threads.=20 =20 Let's take an arbitrary socket descriptor "fd" ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: SSL_write and SSL_read

  1. SSL_write and SSL_read

    This is a multi-part message in MIME format.

    ------_=_NextPart_001_01C77B7A.B6057167
    Content-Type: text/plain;
    charset="us-ascii"
    Content-Transfer-Encoding: quoted-printable

    Hi Friends,

    =20

    I've an application which supports TLS communication in which, socket
    descriptors are handled in threads.=20

    =20

    Let's take an arbitrary socket descriptor "fd" and here we go,

    =20

    Can I send data through "fd" using SSL_write() if I'm in the middle of
    reading the data from the same fd?=20

    =20

    Or if I put it in another way, if SSL_read() returns,
    SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE (from SSL_get_error()) on
    the socket "fd" then, can I send data on the same socket using
    SSL_write() ? (Provided, both read and write operations on the "fd" are
    handled by same thread always.)

    =20

    =20

    Any suggestions would be greatly appreciated :-)

    =20

    Thanks in Advance,

    Soji.=20


    ------_=_NextPart_001_01C77B7A.B6057167
    Content-Type: text/html;
    charset="us-ascii"
    Content-Transfer-Encoding: quoted-printable

    =3D"urn:schemas-microsoft-comfficeffice" =
    xmlns:w=3D"urn:schemas-microsoft-comffice:word" =
    xmlns=3D"http://www.w3.org/TR/REC-html40">


    charset=3Dus-ascii">









    style=3D'font-size:
    10.0pt;font-family:Arial;color:navy'>Hi =
    Friends,>>



    style=3D'font-size:
    10.0pt;font-family:Arial;color:navy'>>



    style=3D'font-size:
    10.0pt;font-family:Arial;color:navy'>I’ve an application which =
    supports
    TLS communication in which, socket descriptors are handled in threads. =
    >>



    style=3D'font-size:
    10.0pt;font-family:Arial;color:navy'>>



    style=3D'font-size:
    10.0pt;font-family:Arial;color:navy'>Let’s take an arbitrary =
    socket
    descriptor “fd” and here we go,>>



    style=3D'font-size:
    10.0pt;font-family:Arial;color:navy'>>



    style=3D'font-size:
    10.0pt;font-family:Arial;color:navy'>Can I send data through =
    “fd”
    using SSL_write() if I’m in the middle of reading the data from =
    the same
    fd? >>



    style=3D'font-size:
    10.0pt;font-family:Arial;color:navy'>>



    style=3D'font-size:
    10.0pt;font-family:Arial;color:navy'>Or if I put it in another way, if =
    SSL_read()
    returns, SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE (from =
    SSL_get_error()) on
    the socket “fd” then, can I send data on the same socket =
    using
    SSL_write() ? (Provided, both read and write operations on the =
    “fd”
    are handled by same thread always.)>>



    style=3D'font-size:
    10.0pt;font-family:Arial;color:navy'>>



    style=3D'font-size:
    10.0pt;font-family:Arial;color:navy'>>



    style=3D'font-size:
    10.0pt;font-family:Arial;color:navy'>Any suggestions would be greatly
    appreciated
    face=3DWingdings> style=3D'font-size:10.0pt;font-family:Wingdings;color:navy'>J t> size=3D2 color=3Dnavy face=3DArial> style=3D'font-size:10.0pt;font-family:Arial;
    color:navy'>>>





    style=3D'font-size:
    10.0pt;font-family:Verdana;color:navy'>>

    >

    style=3D'font-size:
    10.0pt;font-family:Verdana;color:navy'>Thanks in =
    Advance,>>



    style=3D'font-size:
    10.0pt;font-family:Verdana;color:navy'>Soji.
    color=3Dnavy> style=3D'color:navy'> >>











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

  2. Re: SSL_write and SSL_read

    On Apr 10, 5:50 pm, soji...@ccpu.com ("Soji VP") wrote:
    > This is a multi-part message in MIME format.
    >
    > ------_=_NextPart_001_01C77B7A.B6057167
    > Content-Type: text/plain;
    > charset="us-ascii"
    > Content-Transfer-Encoding: quoted-printable
    >
    > Hi Friends,
    >
    > =20
    >
    > I've an application which supports TLS communication in which, socket
    > descriptors are handled in threads.=20
    >
    > =20
    >
    > Let's take an arbitrary socket descriptor "fd" and here we go,
    >
    > =20
    >
    > Can I send data through "fd" using SSL_write() if I'm in the middle of
    > reading the data from the same fd?=20
    >
    > =20
    >
    > Or if I put it in another way, if SSL_read() returns,
    > SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE (from SSL_get_error()) on
    > the socket "fd" then, can I send data on the same socket using
    > SSL_write() ? (Provided, both read and write operations on the "fd" are
    > handled by same thread always.)
    >
    > =20
    >
    > =20
    >
    > Any suggestions would be greatly appreciated :-)
    >
    > =20
    >
    > Thanks in Advance,
    >
    > Soji.=20
    >
    > ------_=_NextPart_001_01C77B7A.B6057167
    > Content-Type: text/html;
    > charset="us-ascii"
    > Content-Transfer-Encoding: quoted-printable
    >
    > =3D"urn:schemas-microsoft-comfficeffice" =
    > xmlns:w=3D"urn:schemas-microsoft-comffice:word" =
    > xmlns=3D"http://www.w3.org/TR/REC-html40">
    >
    >
    > > charset=3Dus-ascii">
    >
    >
    >
    >
    >
    >
    >
    >

    >
    >

    > style=3D'font-size:
    > 10.0pt;font-family:Arial;color:navy'>Hi =
    > Friends,>>


    >
    >

    > style=3D'font-size:
    > 10.0pt;font-family:Arial;color:navy'>>


    >
    >

    > style=3D'font-size:
    > 10.0pt;font-family:Arial;color:navy'>I’ve an application which =
    > supports
    > TLS communication in which, socket descriptors are handled in threads. =
    > >>


    >
    >

    > style=3D'font-size:
    > 10.0pt;font-family:Arial;color:navy'>>


    >
    >

    > style=3D'font-size:
    > 10.0pt;font-family:Arial;color:navy'>Let’s take an arbitrary =
    > socket
    > descriptor “fd” and here we go,>>


    >
    >

    > style=3D'font-size:
    > 10.0pt;font-family:Arial;color:navy'>>


    >
    >

    > style=3D'font-size:
    > 10.0pt;font-family:Arial;color:navy'>Can I send data through =
    > “fd”
    > using SSL_write() if I’m in the middle of reading the data from =
    > the same
    > fd? >>


    >
    >

    > style=3D'font-size:
    > 10.0pt;font-family:Arial;color:navy'>>


    >
    >

    > style=3D'font-size:
    > 10.0pt;font-family:Arial;color:navy'>Or if I put it in another way, if =
    > SSL_read()
    > returns, SSL_ERROR_WANT_READ or SSL_ERROR_WANT_WRITE (from =
    > SSL_get_error()) on
    > the socket “fd” then, can I send data on the same socket =
    > using
    > SSL_write() ? (Provided, both read and write operations on the =
    > “fd”
    > are handled by same thread always.)>>


    >
    >

    > style=3D'font-size:
    > 10.0pt;font-family:Arial;color:navy'>>


    >
    >

    > style=3D'font-size:
    > 10.0pt;font-family:Arial;color:navy'>>


    >
    >

    > style=3D'font-size:
    > 10.0pt;font-family:Arial;color:navy'>Any suggestions would be greatly
    > appreciated
    > face=3DWingdings> > style=3D'font-size:10.0pt;font-family:Wingdings;color:navy'>J > t> > size=3D2 color=3Dnavy face=3DArial> > style=3D'font-size:10.0pt;font-family:Arial;
    > color:navy'>>>


    >
    >

    >
    >

    > style=3D'font-size:
    > 10.0pt;font-family:Verdana;color:navy'>>
    >
    >
    >
    >

    > style=3D'font-size:
    > 10.0pt;font-family:Verdana;color:navy'>Thanks in =
    > Advance,>>


    >
    >

    > style=3D'font-size:
    > 10.0pt;font-family:Verdana;color:navy'>Soji.
    > color=3Dnavy> > style=3D'color:navy'> >>


    >
    >

    >
    >

    >
    >
    >
    >
    >
    > ------_=_NextPart_001_01C77B7A.B6057167--
    > __________________________________________________ ____________________
    > OpenSSL Project http://www.openssl.org
    > User Support Mailing List openssl-us...@openssl.org
    > Automated List Manager majord...@openssl.org



    If I understand correctly, each of your sockets exist on a different
    thread.
    Wouldn't you be better off setting them as non-blocking and auto-
    renegotiation,
    and relieve yourself of having to worry about this?

    Amnon.


+ Reply to Thread