<div dir="ltr"><span style="font-size:12.8px">Yes you are correct. I'm doing things wrong - it seems to be Chrome and Curl that report "no received data" because it actually does work in Firefox. Well, thanks for taking the time.</span><br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-04-26 7:05 GMT+02:00 Alex Hultman <span dir="ltr"><<a href="mailto:alexhultman@gmail.com" target="_blank">alexhultman@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Yes you are correct. I'm doing things wrong - it seems to be Chrome and Curl that report "no received data" because it actually does work in Firefox. Well, thanks for taking the time.</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2016-04-26 6:55 GMT+02:00 Viktor Dukhovni <span dir="ltr"><<a href="mailto:openssl-users@dukhovni.org" target="_blank">openssl-users@dukhovni.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">[ This question belongs on openssl-users, not openssl-dev.  Please<br>
  reply only to openssl-users. ]<br>
<span><br>
On Tue, Apr 26, 2016 at 05:17:46AM +0200, Alex Hultman wrote:<br>
<br>
> SSL_write followed by SSL_shutdown does not actually send the data passed<br>
> to SSL_write if the total data size sent is less than (on my system) 7-8<br>
> bytes.<br>
<br>
</span>This does not happen in "openssl s_client".  You're likely doing<br>
something wrong.<br>
<br>
In one window I start an openssl server:<br>
<br>
    $ cipher=ADH-DES-CBC3-SHA<br>
    $ seclev= # Make that seclev=":@SECLEVEL=0" with OpenSSL 1.1.0 or later<br>
    $ openssl s_server -quiet -cipher "$cipher$seclev" -nocert -accept 12345<br>
<br>
I another window I start a client:<br>
<br>
    $ cipher=ADH-DES-CBC3-SHA<br>
    $ seclev= # Make that seclev=":@SECLEVEL=0" with OpenSSL 1.1.0 or later<br>
    echo XXX | openssl s_client -debug -no_ign_eof -cipher "$cipher$seclev" -connect localhost:12345<br>
<br>
On the server side I see the expected output:<br>
<br>
    XXX<br>
<br>
On the client side after lots of handshake messages:<br>
<br>
    >>> ??? [length 0005]<br>
        17 03 03 00 24<br>
    write to 0x7f7f8bd003d0 [0x7f7f8c80b203] (41 bytes => 41 (0x29))<br>
    0000 - 17 03 03 00 24 c2 19 ea-c6 f1 a8 c7 74 31 50 3d   ....$.......t1P=<br>
    0010 - a1 2f fb f0 d5 4d 2e 85-e0 6a 18 86 27 6a 09 1d   ./...M...j..'j..<br>
    0020 - de 98 4e 69 05 57 0f 4c-93                        ..Ni.W.L.<br>
    DONE<br>
    >>> ??? [length 0005]<br>
        15 03 03 00 24<br>
    write to 0x7f7f8bd003d0 [0x7f7f8c80b203] (41 bytes => 41 (0x29))<br>
    0000 - 15 03 03 00 24 d2 94 f8-11 dd 69 81 f7 ab cc 8c   ....$.....i.....<br>
    0010 - c4 13 4c 80 24 d7 50 10-b9 62 74 d7 21 86 16 78   ..L.$.P..bt.!..x<br>
    0020 - b4 83 87 da 5e 2f d9 5d-34                        ....^/.]4<br>
    >>> TLS 1.2Alert [length 0002], warning close_notify<br>
        01 00<br>
<br>
The first of these is the "XXX" encrypted to 16 bytes, and padded<br>
with a 20-byte SHA1 MAC (the server and client negotiated TLS 1.2<br>
with Encrypt-then-Mac).  The second is the encrypted shutdown alert.<br>
<br>
> Is this known behavior?<br>
<br>
No.<br>
<span><font color="#888888"><br>
--<br>
        Viktor.<br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div>