Not that it should matter, but did you generate your server certificate with openssl or certtool?<br><br><div class="gmail_quote">On Fri, Jul 24, 2009 at 10:11 AM, Nicolas Jungers <span dir="ltr">&lt;<a href="mailto:deblbug@jungers.net">deblbug@jungers.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Mathias Gug a écrit :<br>
<div class="im">&gt; Hi Nicolas,<br>
&gt;<br>
&gt; On Fri, Jul 24, 2009 at 11:16 AM, Nicolas Jungers&lt;<a href="mailto:deblbug@jungers.net">deblbug@jungers.net</a>&gt; wrote:<br>
&gt;&gt; Package: slapd<br>
&gt;&gt; Version: 2.4.11-1<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; #-------- bits from slapd.conf<br>
&gt;&gt;<br>
&gt;&gt; # TLS configuration<br>
&gt;&gt; # CA<br>
&gt;&gt; TLSCACertificateFile /etc/ssl/certs/cacert.org.pem<br>
&gt;&gt; # Cert<br>
&gt;&gt; TLSCertificateFile /etc/ssl/certs/main.jungers.net.pem<br>
&gt;&gt; TLSCertificateKeyFile /etc/ssl/private/main.jungers.net-key.pem<br>
&gt;&gt; #TLSCipherSuite HIGH  &lt;-- not with gnutls (openssl keyword)<br>
&gt;<br>
&gt; Could you try to add the CA Certificate<br>
&gt; (/etc/ssl/certs/cacert.org.pem) to the TLSCertificateFile?<br>
<br>
</div>cat cacert.org.pem main.jungers.net.pem &gt; ldap.jungers.net.pem<br>
<div class="im"><br>
# TLS configuration<br>
# CA<br>
#TLSCACertificateFile /etc/ssl/certs/cacert.org.pem<br>
# Cert<br>
#TLSCertificateFile /etc/ssl/certs/main.jungers.net.pem<br>
</div>TLSCertificateFile /etc/ssl/certs/ldap.jungers.net.pem<br>
<div class="im">TLSCertificateKeyFile /etc/ssl/private/main.jungers.net-key.pem<br>
#TLSCipherSuite HIGH  &lt;-- not with gnutls (openssl keyword)<br>
<br>
<br>
</div>/etc/init.d/slapd restart<br>
Stopping OpenLDAP: slapd.<br>
Starting OpenLDAP: slapd - failed.<br>
The operation failed but no output was produced. For hints on what went<br>
wrong please refer to the system&#39;s logfiles (e.g. /var/log/syslog) or<br>
try running the daemon in Debug mode like via &quot;slapd -d 16383&quot; (warning:<br>
this will create copious output).<br>
<br>
Below, you can find the command line options used by this script to<br>
run slapd. Do not forget to specify those options if you<br>
want to look to debugging output:<br>
<div class="im">  slapd -h &#39;ldap:/// ldaps:///&#39; -g openldap -u openldap -f<br>
/etc/ldap/slapd.conf<br>
</div> 5595 pts/12   S+     0:00 grep slapd<br>
<br>
and<br>
<br>
main slapd[5591]: main: TLS init def ctx failed: -60<br>
<div class="im"><br>
<br>
&gt;<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; #-------- if I try gnutls-cli I get<br>
&gt;&gt;<br>
&gt;&gt; gnutls-cli --x509cafile /etc/ssl/certs/cacert.org.pem -p 389<br>
&gt;&gt; main.jungers.netProcessed 2 CA certificate(s).<br>
&gt;&gt; Resolving &#39;<a href="http://main.jungers.net" target="_blank">main.jungers.net</a>&#39;...<br>
&gt;&gt; Connecting to &#39;91.121.14.130:389&#39;...<br>
&gt;&gt; *** Fatal error: A TLS packet with unexpected length was received.<br>
&gt;&gt; *** Handshake has failed<br>
&gt;&gt; GNUTLS ERROR: A TLS packet with unexpected length was received.<br>
&gt;<br>
&gt; You should use the --starttls option to test against port 389 as this<br>
&gt; port expects to start a plain connection (which is then upgraded to an<br>
&gt; encrypted connection with startTLS).<br>
<br>
</div>ok, but it&#39;s still fails<br>
<br>
gnutls-cli --x509cafile /etc/ssl/certs/cacert.org.pem --starttls -p 389<br>
<a href="http://main.jungers.net" target="_blank">main.jungers.net</a><br>
<div class="im">Processed 2 CA certificate(s).<br>
Resolving &#39;<a href="http://main.jungers.net" target="_blank">main.jungers.net</a>&#39;...<br>
Connecting to &#39;91.121.14.130:389&#39;...<br>
<br>
</div>- Simple Client Mode:<br>
<br>
<br>
*** Starting TLS handshake<br>
<div class="im">*** Fatal error: A TLS packet with unexpected length was received.<br>
*** Handshake has failed<br>
<br>
<br>
<br>
</div><div><div class="h5">_______________________________________________<br>
Pkg-openldap-devel mailing list<br>
<a href="mailto:Pkg-openldap-devel@lists.alioth.debian.org">Pkg-openldap-devel@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/mailman/listinfo/pkg-openldap-devel" target="_blank">http://lists.alioth.debian.org/mailman/listinfo/pkg-openldap-devel</a></div></div></blockquote></div><br>