title: .net1.1 HttpWebRequest auth with x509 certificate from file
body: <p>I have certificate with a full path (with ca), private part, and password named client.p12. Ca cert is self-signed.</p>
  
  <p>I need that my HttpWebRequest use this cert for authentification.</p>
  
  <p>I trying something like</p>
  
  <pre><code>Cert = X509Certificate.CreateFromCertFile("....");
  HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
  req.ClientCertificates.Add(Cert);
  </code></pre>
  
  <p>But if file is p12 or pfx i get error cant load cert from file.</p>
  
  <p>I import this cert into windows cryptoapi and trying export with private part without password (my net1.1 X509Certificate cant load with password - no such overloaded method), but cant, this option inactive.</p>
  
  <p>I export as .cer file, now cert loaded into X509Certificate class, and (i hope) added to httpwebrequest, but it return "cant start ssl session" - i suppose cert is wrong.</p>
  
  <p>How solve that?</p>
  
  <ol>
  <li><p>Is it possible create good .cer certificate without password but with private part , for work with CreateFromCertFile ? (openssl may be, or something else)</p></li>
  <li><p>Is another way to use .p12, .pfx files in .net1.1 application, instead CreateFromCertFile, some third party component may be?</p></li>
  </ol>