title: What subject to use for SetClientCertificate?
body: <p>I'm trying to send a request with:</p>
  
  <pre><code>ActiveXObject("WinHttp.WinHttpRequest.5.1")
  </code></pre>
  
  <p>however this requires a client certificate to do so (which we have been provided). </p>
  
  <p>Having tested in PHP cURL I can do so with:</p>
  
  <pre><code>curl_setopt($SOAP, CURLOPT_SSLCERT,$filepathtocertificate);
  </code></pre>
  
  <p>Which works fine. However I must use IIS running asp(javascript) and point to the certificate store of the machine the script is running on with:</p>
  
  <pre><code> SetClientCertificate("LOCAL_MACHINE\\Personal\\Certificate subject");
  </code></pre>
  
  <p>for our actual deployment. The MS documentation (<a href="http://msdn.microsoft.com/en-us/library/windows/desktop/aa384055(v=vs.85).aspx" rel="noreferrer">http://msdn.microsoft.com/en-us/library/windows/desktop/aa384055(v=vs.85).aspx</a>) suggests that the path above has to state the 'subject' of the certificate, however the certificate seems to have several subjects and no combination of several or all of them seems to yeild any results and I am stuck with the following error before the request is even sent:</p>
  
  <pre><code>WinHttp.WinHttpRequest error '80072f0c'
  
  A certificate is required to complete client authentication
  </code></pre>
  
  <p>Looking in the certificate store and using other scripts in the same folder show they are definitely there but have subjects like: </p>
  
  <pre><code>C=US, O=Organisation NAme, OU="Another Organisation Name, Inc.", CN=Organisation Name Root
  </code></pre>
  
  <p>Or similar. </p>
  
  <p>Any advice on what parameters SetClientCertificate needs to be given to select and send certificates in the certificate store would be much appreciated. </p>