<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000099" bgcolor="#FFFFFF">
    On 29/12/2018 13:19, C.Wehrmeyer wrote:<br>
    <blockquote type="cite"
      cite="mid:38b97114-0c66-40ed-f631-58aa20940a3a@gmx.de">... <br>
    </blockquote>
    <br>
    Your corrections, improvements and enhancements would be very
    welcome as pull requests at <a class="moz-txt-link-freetext" href="https://github.com/openssl/openssl">https://github.com/openssl/openssl</a> -
    thank you for your contributions.<br>
    <br>
    <blockquote type="cite"
      cite="mid:38b97114-0c66-40ed-f631-58aa20940a3a@gmx.de">And don't
      give me any "trust us, we're experienced programmers" bullshit.
      I've *seen* ssl/record/ssl3_record.c:
      <br>
      <br>
      > static const unsigned char ssl3_pad_1[48] = {
      <br>
      >     0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
      <br>
      >     0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
      <br>
      >     0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
      <br>
      >     0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
      <br>
      >     0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36,
      <br>
      >     0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36
      <br>
      > };
      <br>
      > static const unsigned char ssl3_pad_2[48] = {
      <br>
      >     0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c,
      <br>
      >     0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c,
      <br>
      >     0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c,
      <br>
      >     0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c,
      <br>
      >     0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c,
      <br>
      >     0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c, 0x5c
      <br>
      > };
      <br>
      <br>
      What's wrong with that, you ask?</blockquote>
    <br>
    Yes, I ask; why not tell us?<br>
    <br>
    <blockquote type="cite"
      cite="mid:38b97114-0c66-40ed-f631-58aa20940a3a@gmx.de"> Let me
      show you how I'd have done that:
      <br>
      <br>
      > static const unsigned char ssl3_pad_1[] =
      <br>
      > {
      <br>
      >     "66666666"
      <br>
      >     "66666666"
      <br>
      >     "66666666"
      <br>
      >     "66666666"
      <br>
      >     "66666666"
      <br>
      >     "66666666"
      <br>
      > };
      <br>
      >
      <br>
      > static const unsigned char*ssl3_pad_2[] =
      <br>
      > {
      <br>
      >     "\\\\\\\\\\\\\\\\"
      <br>
      >     "\\\\\\\\\\\\\\\\"
      <br>
      >     "\\\\\\\\\\\\\\\\"
      <br>
      >     "\\\\\\\\\\\\\\\\"
      <br>
      >     "\\\\\\\\\\\\\\\\"
      <br>
      >     "\\\\\\\\\\\\\\\\"
      <br>
      > };
      <br>
      <br>
      So, no. I don't trust anyone. Especially not this mess of a code.
      <br>
    </blockquote>
    <br>
    So instead of correct portable code which derives obviously and
    straightforwardly from the specification, you'd write arrays of a
    different length from the original, the first 48 bytes of which
    would only be correct in some compilation environments, and even in
    the cases where those 48 bytes end up correct they have no obvious
    relationship to the specification they are implementing (your
    obfuscation making the code much more difficult to review). How are
    these changes improvements? I'd walk you out of an interview if you
    offered this as an implementation, let alone as an improvement.<br>
    <br>
    For the record, I have nothing to do with any of the code in
    OpenSSL.<br>
    <br>
    <pre class="moz-signature" cols="72">-- 
J. J. Farrell
Not speaking for Oracle</pre>
  </body>
</html>