Gavin Lawrie

Q: Server 3 / SSL Certificate / Open Directory - Problem!

We've updated from Server 2 to Server 3 / OS X 10.9.

 

We have an SSL certificate for server from Comodo.

 

Under Server 2, all worked just fine, with the SSL certificate being used to secure all services (configure via Server app).

 

Under Server 3, all works just fine, but Open Directory will not accept certificate - so Certificates / Settings in Server 3 app shows "Custom Configuration" for Settings - and on inspecting this it is because Open Directory set to be not secured but everything else is using SSL.

 

I've tried setting the Open Directory to use the SSL, but when ever I do it simply bounces back to being unsecured.

 

Does this matter?  Presumably it should be possible (as the standard setting appears to try and set Open Directory to use the SSL certificate), but not sure whether trying to fix is simply a fools errand.

 

Anyone got any clues as to whether to fix or not, and if to fix, how?

 

Thanks in advance.

Mac mini (Late 2012), OS X Server

Posted on Nov 6, 2013 5:22 AM

Close

Q: Server 3 / SSL Certificate / Open Directory - Problem!

  • All replies
  • Helpful answers

first Previous Page 4 of 8 last Next
  • by Gavin Lawrie,

    Gavin Lawrie Gavin Lawrie Feb 4, 2014 6:10 AM in response to Gavin Lawrie
    Level 2 (413 points)
    Mac App Store
    Feb 4, 2014 6:10 AM in response to Gavin Lawrie

    Ahah.  Got it.  Wrong 'trust policy' - if I choose "Generic" on first panel of Evaluation thing I get this outcome:

     

    Screen Shot 2014-02-04 at 14.08.22.PNG

     

    Which, as you found, says it vaidlates OK but won't 'evaluate' saying it has "No root cert found" ...

  • by Peter-Erik,

    Peter-Erik Peter-Erik Feb 4, 2014 6:21 AM in response to Gavin Lawrie
    Level 1 (10 points)
    Feb 4, 2014 6:21 AM in response to Gavin Lawrie

    In terminal if you do a  "openssl s_client -connect 127.0.0.1:636"  (sudo or root)

     

    do you also get an error in line 3?

     

    verify error:num=19:self signed certificate in certificate chain

  • by Gavin Lawrie,

    Gavin Lawrie Gavin Lawrie Feb 4, 2014 6:38 AM in response to Peter-Erik
    Level 2 (413 points)
    Mac App Store
    Feb 4, 2014 6:38 AM in response to Peter-Erik


    Peter-Erik wrote:

     

    In terminal if you do a  "openssl s_client -connect 127.0.0.1:636"  (sudo or root)

     

    do you also get an error in line 3?

     

    verify error:num=19:self signed certificate in certificate chain

    Yes, I get exactly that error.

     

    HTH

  • by Peter-Erik,

    Peter-Erik Peter-Erik Feb 4, 2014 6:44 AM in response to Gavin Lawrie
    Level 1 (10 points)
    Feb 4, 2014 6:44 AM in response to Gavin Lawrie

    @Gavin its a Apple problem handeling Comodo certificate can you also add a bug at https://bugreport.apple.com ? Maybe this will speed up some investigation there thanks

  • by Gavin Lawrie,

    Gavin Lawrie Gavin Lawrie Feb 4, 2014 7:03 AM in response to Peter-Erik
    Level 2 (413 points)
    Mac App Store
    Feb 4, 2014 7:03 AM in response to Peter-Erik

    submitted as bug 15978557

  • by tim_r_66,

    tim_r_66 tim_r_66 Feb 4, 2014 12:15 PM in response to Peter-Erik
    Level 1 (50 points)
    Feb 4, 2014 12:15 PM in response to Peter-Erik

    Hi Peter,

     

    I too get that error but perhaps you could take a few mins to explain why that shows it is a bug with Apple.  A self-signed cert is what my system is configured to use since the COMODO cert wasn't accepted, so I don't understand what the openssl s_client command is testing regarding the COMODO cert?

     

    I'm happy to submit a bug report as well, as I have one with COMODO too.  Everyone is pointing to Apple; I'm pointing at both until I see resolution or I ask for a return from COMODO.  BTW, they tried to tell me they are not authorized by Apple to talk with Apple about the problem?!?  I let that go because it didn't make any sense to me why a company would agree with Apple to not talk with Apple. :-~

     

    In my workings with COMOODO, I noticed that Apple has a COMODO root CA cert in the System Roots, and that COMODO also has users install an intermediate with the same CN.  When I try to evaluate certs at each level, I get results for which I don't personally understand the consequences. More specifics:

     

    I have two COMODO Certification Authority certs.  One is in System Roots, it is listed as a Root certificate authority, and it has an expiration date of 12/31/2029. The second is an intermediate CA in System and it expires 5/30/2020.  They both have the same CN.  Is this right?  I’ve confirmed this on another server.

     

    So, when I evaluate *.mydomain.com, it shows No root found but tries to establish a trust chain back to AddTrust External CA.   

     

    When I evaluate EssentialSSL, it stops with the COMODO root. 

     

    When I evaluate COMODO CA (Intermedate) it says “No root cert found” but tries to establish a trust chain back to AddTrust External CA

     

    When I evaluate COMODO CA (root) in System Roots, it says “Success” and “Root ALSO in System Roots”

     

    When I evaluate UTN - DATACorp SGC in System, it says “No root cert found” but shows a trust chain back to AddTrust External CA Root

     

    When I evaluate AddTrust External CA Root, is says success but still also says “Root ALSO in System Roots”.

     

    I've asked COMODO support about this and they are investigating further. 

     

    Again, I am not knowledgeable enough about this to fully understand, but it causes me to wonder if the evaluation of a cert is generating errors because there are two different certs with the same CN?  Or is this completely normal and unrelated?

     

    Tim

  • by Peter-Erik,

    Peter-Erik Peter-Erik Feb 4, 2014 1:04 PM in response to tim_r_66
    Level 1 (10 points)
    Feb 4, 2014 1:04 PM in response to tim_r_66

    Iam no expert in certficates, but the Comodo certficate works (perfect) with 10.8.5 and after the upgrade (test) to 10.9.1 i get the self sign certicates errors and open directory is not working any more with the certificate. Also when i setup a new (test)server with the certificate same problem. So it looks that the problem begins with 10.9 and higher.

     

    so I don't understand what the openssl s_client command is testing regarding the COMODO cert

    nothing just a test and you have the same problem

     

    In my case only OD is refusing to work with the certificate the others web etc. have no problem

  • by Gavin Lawrie,

    Gavin Lawrie Gavin Lawrie Feb 4, 2014 1:10 PM in response to tim_r_66
    Level 2 (413 points)
    Mac App Store
    Feb 4, 2014 1:10 PM in response to tim_r_66

    tim_r_66 wrote:

     

    I too get that error but perhaps you could take a few mins to explain why that shows it is a bug with Apple. 

     

    We had the same certificate installed with Server 2.2 and it worked fine.  We only found a problem (OD Service not accepting certificate) after upgrade to Server 3.  Something happened with Server 3 code.

     

    Either Apple broke something, or removed some bit of 'deprecated' functionality.  Either way a good place to find out what is going on is to ask them to fix or explain.  Seems like neither going on right now. 

     

    But from my perspective the only thing I changed was the version of Server.app, and now something on my system has stopped working as it did before.  So recording a bug for it seems like legit move.

  • by tim_r_66,

    tim_r_66 tim_r_66 Feb 4, 2014 3:31 PM in response to Gavin Lawrie
    Level 1 (50 points)
    Feb 4, 2014 3:31 PM in response to Gavin Lawrie

    I agree with both of you.  I recently saw a thread from a couple years ago that talked about the fact that Apple started enforcing longer keys in SSL certs (if I recall correctly) but they didn't tell everyone.  So, things started breaking.  Not really a bug per se, but rather a unpublished standard.  If something similar has happened here, then COMODO might be able to make the adjustment on their end.  Again, just why I am pushing on both for now.  Clearly something changed in Apple's code.  I'm not completey convinced it is a bug vice an unpublished standard.

     

    Do either of you see the same behavior I described above when evaluated certificates?

     

    Tim

  • by Marc Kerr,

    Marc Kerr Marc Kerr Feb 5, 2014 11:57 AM in response to Gavin Lawrie
    Level 1 (0 points)
    Feb 5, 2014 11:57 AM in response to Gavin Lawrie

    Thanks all, for the info in this thread. I'm seeing the same issue on 10.9.1 and using an InCommon/Comodo cert.

     

    @ Peter-Erik. (I'm not picking just trying to understand this better) If you have your web server running and run "sudo openssl s_client -connect 127.0.0.1:443" you should see the same error as for LDAPS .

     

    verify error:num=19:self signed certificate in certificate chain

     

    I believe that is actually the correct and expected output. See http://stackoverflow.com/questions/4103472/ssl-handshake-fails-with-a-verisign-c hain-certificate-that-contains-two-ca-s

     

    Also from the openssl command I'm seeing "Secure Renegotiation IS supported" and "Verify return code: 0 (ok)" So I think the cert is actually there and working for LDAP?

     

    *** The one issue I see when I run the command is that the session doesn't close properly when run against 636. I have to ^C to get it to drop the connection. For port 443 it closes fine. I'm not sure what's going on there.

     

    Also whenever I try to set the InCommon cert for OD I get the following note in the "Configuration Log" for OD.

     

    2014-02-05 19:08:56 +0000 slapconfig -setldapconfig

    2014-02-05 19:08:56 +0000 Provided SSL Identity server.example.com is already configured for OD.

     

    It looks like it's all working but something isn't showing up in the GUI. If we could get someone  not seeing the issue to run "sudo openssl s_client -connect 127.0.0.1:636" then we might see what the differences are. Here is my output with key info redacted.

     

    $ sudo openssl s_client -connect 127.0.0.1:636

    Password:

    CONNECTED(00000003)

    depth=2 /C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root

    verify error:num=19:self signed certificate in certificate chain

    verify return:0

    ---

    Certificate chain

    0 s:/C=US/postalCode=12345/ST=ST/L=City/street=7th St./street= M005/O=My University/OU=DEPT/CN=server.example.com

       i:/C=US/O=Internet2/OU=InCommon/CN=InCommon Server CA

    1 s:/C=US/postalCode=12345/ST=IST/L=City/street=7th St./street= M005/O=My University/OU=DEPT/CN=server.example.com

       i:/C=US/O=Internet2/OU=InCommon/CN=InCommon Server CA

    2 s:/C=US/O=Internet2/OU=InCommon/CN=InCommon Server CA

       i:/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root

    3 s:/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root

       i:/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root

    ---

    Server certificate

    -----BEGIN CERTIFICATE-----

    xxx

    xxx

    -----END CERTIFICATE-----

    subject=/C=US/postalCode=12345/ST=ST/L=City/street=7th St./street= M005/O=My University/OU=DEPT/CN=server.example.com

    issuer=/C=US/O=Internet2/OU=InCommon/CN=InCommon Server CA

    ---

    No client certificate CA names sent

    ---

    SSL handshake has read 5217 bytes and written 456 bytes

    ---

    New, TLSv1/SSLv3, Cipher is AES256-SHA

    Server public key is 2048 bit

    Secure Renegotiation IS supported

    Compression: NONE

    Expansion: NONE

    SSL-Session:

        Protocol  : TLSv1

        Cipher    : AES256-SHA

        Session-ID: xxx

        Session-ID-ctx:

        Master-Key: xxxx

        Key-Arg   : None

        Start Time: 1391629409

        Timeout   : 300 (sec)

        Verify return code: 0 (ok)

    ---

  • by Gavin Lawrie,

    Gavin Lawrie Gavin Lawrie Feb 5, 2014 12:15 PM in response to Marc Kerr
    Level 2 (413 points)
    Mac App Store
    Feb 5, 2014 12:15 PM in response to Marc Kerr

    Hi Marc,

     

    I am based in UK not US, and although my output for sudo openssl s_client -connect 127.0.0.1:636 is almost identical to yours, it differs only in respect of the certificate itself, the certificate chain and subject.  Here are the relevant lines (certificate excluded... ):

     

    Certificate chain

    0 s:/OU=Domain Control Validated/OU=COMODO SSL Unified Communications/CN=2GC.org

       i:/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO SSL CA

    1 s:/OU=Domain Control Validated/OU=COMODO SSL Unified Communications/CN=2GC.org

       i:/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO SSL CA

    2 s:/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO SSL CA

       i:/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root

    3 s:/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root

       i:/C=SE/O=AddTrust AB/OU=AddTrust External TTP Network/CN=AddTrust External CA Root

     

    and

     

    subject=/OU=Domain Control Validated/OU=COMODO SSL Unified Communications/CN=2GC.org

    issuer=/C=GB/ST=Greater Manchester/L=Salford/O=COMODO CA Limited/CN=COMODO SSL CA

     

    I am not sure knowing this helps much, but at least eliminates the specific certificate chain as being the issue.

     

    Probably what we need is someone with a non-comodo certificate to run same command and see what (if anything) is different.

  • by tim_r_66,

    tim_r_66 tim_r_66 Feb 5, 2014 2:18 PM in response to Gavin Lawrie
    Level 1 (50 points)
    Feb 5, 2014 2:18 PM in response to Gavin Lawrie

    Interestly, my output for the Certificate chain is different. Mine reflects the self-signed OD Intermediate CA the system set up. And CNs vice OU/C field names. 

     

    That sure doesn't help me understand the expected behavior :-(

     

    Tim

  • by Marc Kerr,

    Marc Kerr Marc Kerr Feb 6, 2014 7:22 AM in response to Gavin Lawrie
    Level 1 (0 points)
    Feb 6, 2014 7:22 AM in response to Gavin Lawrie

    So with further research it does appear, as Peter-Erik stated, verify error:num=19 is not correct behavior. Take a look at the info at http://jw35.blogspot.com/2010/05/doing-certificate-verification-in.html

     

    "If you see "Verify return code: 19 (self signed certificate in certificate chain)" then either the servers is really trying to use a self-signed certificate (which a client is never going to be able to verify),or OpenSSL hasn't got access to the necessary root but the server is trying to provide it itself (which it shouldn't do becasue it's pointless - a client can never trust a server to supply the root coresponding to the server's own certificate)."

     

    I think this has something to do with the issue of not being able t select the cert for OD but I coudl be on a very wrong track. I've removed the AddTrust External TTP Network cert from the System certs. It's still in System Roots, and should be as far as I know. Even so I still see the verify error. Also when I use the web server and test it for SSL using https://www.ssllabs.com/ssltest/index.html. SSL labs is also showing an issue with the root cert in the chain.

     

    Maybe someone with more knowledge about how this works can help.

  • by scott88,

    scott88 scott88 Feb 6, 2014 7:57 AM in response to scott88
    Level 1 (0 points)
    Feb 6, 2014 7:57 AM in response to scott88

    Just got word that my bug (http://openradar.appspot.com/15914873) has been marked as a duplicate of 15691451 which is still open.

  • by tim_r_66,

    tim_r_66 tim_r_66 Feb 6, 2014 12:12 PM in response to Marc Kerr
    Level 1 (50 points)
    Feb 6, 2014 12:12 PM in response to Marc Kerr

    I don't claim to be more knowledgeable, but what you're describing is also why I'm most intrigued by the results when I try to evaluate certificates, and the fact that I have two for COMODO with the same CN.  My hypothesis is that the system cannot find the right root, FWIW.

     

    Tim

first Previous Page 4 of 8 last Next