<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:1136532491;
        mso-list-type:hybrid;
        mso-list-template-ids:55606864 -1858420084 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-start-at:600;
        mso-level-number-format:bullet;
        mso-level-text:\F0D8;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;
        mso-fareast-font-family:Calibri;
        mso-bidi-font-family:"Times New Roman";}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal>I have ExternalAuth working fine over regular LDAP. But I need to run it over LDAPS for security reasons.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>We use an internal CA for our certs. I’ve added it to /etc/pki/tls/certs/ca-bundle.crt (which looks to be linked to /etc/ssl/certs/ca-bundle.crt)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>This runs successfully (used to error before I added the CA certs to the bundle):<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>openssl s_client -connect dc.mydomain.local:636 -CApath /etc/ssl/certs<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’ve also verified the cert/cert chain:<o:p></o:p></p><p class=MsoNormal>openssl verify -CAfile /etc/ssl/certs/ca-bundle.crt dc.mydomain.local.pem<o:p></o:p></p><p class=MsoNormal>dc.mydomain.local.pem: OK<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>However, this errors out with a bad cert error (shortened –D, but it’s the same string that works when using LDAP and ldapsearch over regular ldap works fine):<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>ldapsearch -d 2 -LLL -v -x -H ldaps:// dc.mydomain.local:636 -b 'DC=mydomain,DC=local' -D 'CN=Apache,OU…,DC= mydomain,DC=local' -w '**pass**'  '(sn=smith)' cn sn<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Results (snipped hex code):<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>ldap_initialize( ldaps://dc.mydomain.local:636/??base )<o:p></o:p></p><p class=MsoNormal>tls_write: want=60, written=60<o:p></o:p></p><p class=MsoNormal>tls_read: want=3, got=3<o:p></o:p></p><p class=MsoNormal>tls_read: want=2, got=2<o:p></o:p></p><p class=MsoNormal>tls_read: want=2724, got=2724<o:p></o:p></p><p class=MsoNormal>TLS: certificate [CN= dc.mydomain.local] is not valid - error -8179:Unknown code ___f 13.<o:p></o:p></p><p class=MsoNormal>tls_write: want=7, written=7<o:p></o:p></p><p class=MsoNormal>TLS: error: connect - force handshake failure: errno 21 - moznss error -8179<o:p></o:p></p><p class=MsoNormal>TLS: can't connect: TLS error -8179:Unknown code ___f 13.<o:p></o:p></p><p class=MsoNormal>ldap_sasl_bind(SIMPLE): Can't contact LDAP server (-1)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Running LDP.exe on the domain controllers running in SSL mode works fine.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>RT’s log gives the following:<o:p></o:p></p><p class=MsoNormal>[Wed Mar 21 19:04:41 2012] [critical]: RT::Authen::ExternalAuth::LDAP::_GetBoundLdapObj Can't bind: LDAP_OPERATIONS_ERROR 1 (/opt/rt4/local/plugins/RT-Authen-ExternalAuth/lib/RT/Authen/ExternalAuth/LDAP.pm:492)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>So I’m guessing it’s probably getting that same “is not valid” error… but why?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I’ve googled for hours looking for anything beyond making sure the CA cert was in the bundle. Does ldapsearch/RT externalAuth use a different CA bundle than /etc/pki/tls/certs/ca-bundle.crt (or the linked /etc/ssl/certs/ca-bundle.crt)? Any idea what I’m missing?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Running centos 6 and openssl -1.0.0-20.el6_2.2.x86_64 (latest in yum repo… same thing when I ran 1.0.0-10 too).<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Brent<o:p></o:p></p></div></body></html>