[From nobody Wed Nov  4 16:00:04 2026
Received: (at maintonly) by bugs.debian.org; 31 Jan 2008 03:35:28 +0000
X-Spam-Checker-Version: SpamAssassin 3.1.4-bugs.debian.org_2005_01_02 
 (2006-07-26) on rietz.debian.org
X-Spam-Level: **
X-Spam-Status: No, score=2.8 required=4.0 tests=BAYES_00,CNSITESPRON,
 DNS_FROM_RFC_ABUSE,DNS_FROM_RFC_POST,FORGED_HOTMAIL_RCVD,FOURLA,
 HAS_PACKAGE,HTML_20_30,HTML_MESSAGE,MONEY,STOCKLIKE autolearn=no 
 version=3.1.4-bugs.debian.org_2005_01_02
Return-path: &lt;ratness@hotmail.com&gt;
Received: from bay0-omc3-s24.bay0.hotmail.com ([65.54.246.224])
 by rietz.debian.org with esmtp (Exim 4.63)
 (envelope-from &lt;ratness@hotmail.com&gt;) id 1JKQD2-0003qR-6n
 for maintonly@bugs.debian.org; Thu, 31 Jan 2008 03:35:28 +0000
Received: from BAY101-W22 ([64.4.56.122]) by bay0-omc3-s24.bay0.hotmail.com
 with Microsoft SMTPSVC(6.0.3790.3959); 
 Wed, 30 Jan 2008 19:35:22 -0800
Message-ID: &lt;BAY101-W22EDDB7D605066E03DED4BA3370@phx.gbl&gt;
Content-Type: multipart/alternative;
 boundary=&quot;_567d5895-91e2-4aa6-b26c-5dd2d8049a9c_&quot;
X-Originating-IP: [71.65.249.65]
From: Greg Cox &lt;ratness@hotmail.com&gt;
To: &lt;maintonly@bugs.debian.org&gt;
Subject: check_ldap with starttls requires hostname to match cert name
Date: Thu, 31 Jan 2008 03:35:22 +0000
Importance: Normal
MIME-Version: 1.0
X-OriginalArrivalTime: 31 Jan 2008 03:35:22.0791 (UTC)
 FILETIME=[4F70AB70:01C863BA]
Delivered-To: maintonly@bugs.debian.org

--_567d5895-91e2-4aa6-b26c-5dd2d8049a9c_
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;
Content-Transfer-Encoding: quoted-printable

Package: nagios-plugins-standard
Version: 1.4.10-1
Severity: wishlist

This is probably something to kick upstream.

Serverside: slapd 2.4.7-3 with TLS (not ldaps) enabled.  It's running on a =
VM with a hostname of 'utilserver.domain.org', and its SSL cert has a CN of=
 'utilserver', since usually only internal users interact with it.

$ /usr/lib/nagios/plugins/check_ldap -T -H utilserver -b `grep BASE /etc/ld=
ap/ldap.conf| awk '{print $2}'`
LDAP OK - 0.041 seconds response time|time=3D0.040605s;;;0.000000
$ host utilserver
utilserver.domain.org has address 192.168.20.20
$ /usr/lib/nagios/plugins/check_ldap -T -H 192.168.20.20 -b `grep BASE /etc=
/ldap/ldap.conf| awk '{print $2}'`
=0A=
Could not init startTLS at port 389!
=0A=
$ /usr/lib/nagios/plugins/check_ldap -T -H utilserver.domain.org -b `grep B=
ASE /etc/ldap/ldap.conf| awk '{print $2}'`
=0A=
Could not init startTLS at port 389!
=0A=

It appears (though I haven't confirmed since my C-fu is weak) that the -T f=
lag co-opts the hostname as specified in the -H and uses that in its TLS ha=
ndshake.  But that overload is not always good: my nagios checks, which use=
 the FQDN, fail.

Suggestion:
-T is currently a boolean flag.  How about -T [optional hostname for certif=
icate handshake if -H isn't good enough]?  I can't think of anything else y=
ou might want after -T, myself.

Thanks!

_________________________________________________________________
Connect and share in new ways with Windows Live.
http://www.windowslive.com/share.html?ocid=3DTXT_TAGHM_Wave2_sharelife_0120=
08=

--_567d5895-91e2-4aa6-b26c-5dd2d8049a9c_
Content-Type: text/html; charset=&quot;iso-8859-1&quot;
Content-Transfer-Encoding: quoted-printable

&lt;html&gt;
&lt;head&gt;
&lt;style&gt;
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
&lt;/style&gt;
&lt;/head&gt;
&lt;body class=3D'hmmessage'&gt;&lt;div style=3D&quot;text-align: left;&quot;&gt;Package: nagios-=
plugins-standard&lt;br&gt;Version: 1.4.10-1&lt;br&gt;Severity: wishlist&lt;br&gt;&lt;br&gt;This is =
probably something to kick upstream.&lt;br&gt;&lt;br&gt;Serverside: slapd 2.4.7-3 with =
TLS (not ldaps) enabled.&nbsp; It's running on a VM with a hostname of 'uti=
lserver.domain.org', and its SSL cert has a CN of 'utilserver', since usual=
ly only internal users interact with it.&lt;br&gt;&lt;br&gt;$ /usr/lib/nagios/plugins/c=
heck_ldap -T -H utilserver -b `grep BASE /etc/ldap/ldap.conf| awk '{print $=
2}'`&lt;br&gt;LDAP OK - 0.041 seconds response time|time=3D0.040605s;;;0.000000&lt;b=
r&gt;$ host utilserver&lt;br&gt;utilserver.domain.org has address 192.168.20.20&lt;br&gt;$=
 /usr/lib/nagios/plugins/check_ldap -T -H 192.168.20.20 -b `grep BASE /etc/=
ldap/ldap.conf| awk '{print $2}'`&lt;br&gt;=0A=
Could not init startTLS at port 389!&lt;br&gt;=0A=
$ /usr/lib/nagios/plugins/check_ldap -T -H utilserver.domain.org -b `grep B=
ASE /etc/ldap/ldap.conf| awk '{print $2}'`&lt;br&gt;=0A=
Could not init startTLS at port 389!&lt;br&gt;=0A=
&lt;br&gt;It appears (though I haven't confirmed since my C-fu is weak) that the =
-T flag co-opts the hostname as specified in the -H and uses that in its TL=
S handshake.&nbsp; But that overload is not always good: my nagios checks, =
which use the FQDN, fail.&lt;br&gt;&lt;br&gt;Suggestion:&lt;br&gt;-T is currently a boolean f=
lag.&nbsp; How about -T [optional hostname for certificate handshake if -H =
isn't good enough]?&nbsp; I can't think of anything else you might want aft=
er -T, myself.&lt;br&gt;&lt;br&gt;Thanks!&lt;br&gt;&lt;/div&gt;&lt;br /&gt;&lt;hr /&gt;Connect and share in new=
 ways with Windows Live. &lt;a href=3D'http://www.windowslive.com/share.html?o=
cid=3DTXT_TAGHM_Wave2_sharelife_012008' target=3D'_new'&gt;Get it now!&lt;/a&gt;&lt;/bo=
dy&gt;
&lt;/html&gt;=

--_567d5895-91e2-4aa6-b26c-5dd2d8049a9c_--


]