title: Indy certificate authentication
body: <p>I need to connect to a web service with Delphi and Indy v10 using a certificate authentification.</p>
  
  <p>I have following this tutorial:</p>
  
  <p><a href="http://blog.csdn.net/happy4nothing/article/details/201265" rel="nofollow noreferrer">IndySSL - using certificate authentication - Client side issues [zz]</a></p>
  
  <p>but I obtain a <code>400 Bad Request</code> response.</p>
  
  <p>This is my code. It seems that the certificat is ignored. If I comment these lines I obtain the same <code>400</code>.</p>
  
  <pre><code>IdSSLIOHandlerSocketOpenSSL1.SSLOptions.CertFile:= 'certificate_file.crt';
  IdSSLIOHandlerSocketOpenSSL1.SSLOptions.KeyFile:=  'private_key.pem';
  IdSSLIOHandlerSocketOpenSSL1.SSLOptions.RootCertFile:= 'myissuercerts.cer';
  IdSSLIOHandlerSocketOpenSSL1.SSLOptions.VerifyDepth := 2;
  IdSSLIOHandlerSocketOpenSSL1.SSLOptions.Method := sslvSSLv23;
  </code></pre>
  
  <p>Do you have an idea?</p>