8982 Support building with OpenSSL 1.1

Review Request #827 — Created Jan. 31, 2018 and submitted

citrus
illumos-gate
master
8982
c6ccd50...
general
8982 Support building with OpenSSL 1.1
  • libkrb5/pkinit - tested certificate-based preauth/pkinit between machine and local KDC. Confirmed modified code was being used via dtrace.
  • libkmf - Test kmf_openssl plugin with pktool.
  • sendmail - tested basic TLS interop
  • 0
  • 0
  • 9
  • 0
  • 9
Description From Last Updated
citrus
yuripv
  1. This looks very interesting. I wonder though how this compares to using LibreSSL -- will we have to do separate changes to use it as well, or this makes us closer to both OpenSSL 1.1 and LibreSSL?

    1. This change still retains compatibility with the OpenSSL 1.0 API by changing pre 1.0 calls and methods to new ones supported by both 1.0 & 1.1, or using 1.1 methods and adding a backwards-compatibility function for 1.0.

      So I don't think it takes us any closer to, or further away from, LibreSSL.

  2. 
      
citrus
citrus
yuripv
  1. 
      
  2. usr/src/Makefile (Diff revision 2)
     
     

    This check is somewhat bothersome -- we don't really need the openssl utility to build the gate, only the openssl libs? I understand that I'm nitpicking here, but still..

    1. Good point, it should not abort if the openssl utility is not found - I will remove the exit line.
      It's still useful to have the openssl version and API level in the mail_msg since for a while at least people will be using different versions and maybe different API levels within OpenSSL 1.1

  3. 
      
citrus
citrus
jbk
  1. Aside from the OPENSSL macro question, there was nothing obvious from a first glance. I'll plan to look over everything some more a bit later as well, so there might be more questions later.

  2. usr/src/Makefile.master (Diff revision 3)
     
     

    Is this strictly for version detection/printing in nightly(1) (via usr/src/Makefile)?

    1. Purely for including the version and API level in the mail_msg as an indication of the build environment. It can be overridden through the .env file if in a different place.
      The openssl binary is not mandatory for building, if it isn't found then there's just a message to that effect.

  3. 
      
citrus
igork
  1. Ship It!
  2. 
      
jbk
  1. 
      
  2. usr/src/cmd/sendmail/src/tls.c (Diff revision 4)
     
     

    Can the DSA_new() call succeed while the DSA_generate_parameters_ex() call fail? If so, this could leak memory.

  3. It seems like if 'q = BN_new()' fails, g will get leaked.

  4. Similar concern about leaking g as above.

  5. if q = BN_new() fails, it appears g will be leaked.

  6. Won't this leak rsa if it fails?

    1. No worse than the original code, but I will fix this.

  7. Won't this leak rsa and n if this fails?

  8. Similar questions as above.

  9. 
      
citrus
  1. Thanks for the reviews, I've will push an updated patch-set once I've re-tested.

  2. 
      
citrus
jbk
  1. Ship It!
  2. 
      
citrus
Review request changed

Status: Closed (submitted)

Loading...