title: Nagios check_ssl_cert error: SSL_CERT CRITICAL: Error: verify depth is 6
body: <p>I am setting up a Nagios/Icinga Monitoring system to monitor my enviroment. I would like to monitor my SSL certs with check_ssl_cert by it is not working on all sites. </p>
  
  <p>My command:
  </p>
  
  <pre><code>/usr/lib/nagios/plugins/check_ssl_cert -c 7 -w 28 -H 141.85.37.43 -r /etc/ssl/certs/
  </code></pre>
  
  <p>returns:<code>SSL_CERT CRITICAL: Error: verify depth is 6</code></p>
  
  <p>(141.85.37.43 is just an example adress, not my own, but makes the same mistake).</p>
  
  <p>if i try 
      </p>
  
  <pre><code># openssl s_client -connect ftp.myDomain.de:443
  CONNECTED(00000003)
  140037719324328:error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal     error:s23_clnt.c:741:
  ---
  no peer certificate available
  ---
  No client certificate CA names sent
  ---
  SSL handshake has read 7 bytes and written 320 bytes
  ---
  New, (NONE), Cipher is (NONE)
  Secure Renegotiation IS NOT supported
  Compression: NONE
  Expansion: NONE
  ---
  </code></pre>
  
  <p>or </p>
  
  <pre><code># curl https://ftp.myDomain.de:443 -v
  * About to connect() to ftp.myDomain.de port 443 (#0)
  *   Trying 212.xxx.xxx.xxx...
  * connected
  * Connected to ftp.myDomain.de (212.xxx.xxx.xxx) port 443 (#0)
  * successfully set certificate verify locations:
  *   CAfile: none
    CApath: /etc/ssl/certs
  * SSLv3, TLS handshake, Client hello (1):
  * SSLv3, TLS alert, Server hello (2):
  * error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error
  * Closing connection #0
  curl: (35) error:14077438:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert internal error
  </code></pre>
  
  <p>I am using a crushFTP on a ubuntu system called <code>ftp.myDomain.de</code>. I can use it with <code>https://ftp.myDomain.de</code> without any problem.
  The cert is installed as a .pem file and was validated vom Thawte.    </p>
  
  <p>Is there something wrong with my cert? </p>