title: nginx client authentication with multiple client certificates
body: <p>I am trying to set up a NGINX to perform client authentication against multiple clients. The problem I have is that those clients will have different certificates, basically different Root CAs:</p>
  
  <pre><code>[clientA.crt] ClientA &gt; IntermediateA &gt; RootA
  [clientB.crt] ClientB &gt; IntermediateB1 &gt; IntermediateB2 &gt; RootB
  </code></pre>
  
  <p>I looked at the NGINX documentation and I noticed the <code>ssl_client_certificate</code> directive. However, that property alone seems not work by itself, for example, if I configure it for only work for clientA for now:            </p>
  
  <pre><code>ssl_client_certificate /etc/nginx/ssl/clientA.crt;   
  ssl_verify_client on;
  </code></pre>
  
  <p>Then I received a 400 error code back. By looking at other questions, I figured out that I also have to also use <code>ssl_verify_depth: 3</code>. Therefore, if I want concatenate both clientA and clientB in a bundle PEM to allow both clients, will I need use a high value? What's the purpose of this directive and what are the implications of setting to a high number with a bundled PEM?</p>