title: The server mode SSL must use a certificate with the associated private key - during TLS handshake
body: <p>I have a certificate <code>someCert.cer</code>. I imported it into my local certificates store using MMC utility. My C# application is able to access it using following code:</p>
  
  <pre><code>var store = new X509Store(StoreName.My, StoreLocation.CurrentUser);
  X509Certificate2 certificate = null;
  store.Open(OpenFlags.ReadOnly);
  try
  {
      var certificateCollection = store.Certificates.Find(X509FindType.FindByThumbprint, "THUMBPRINT", false);
      certificate = certificateCollection[0];
  }
  finally
  {
      store.Close();
  }
  </code></pre>
  
  <p>The application exposes TCP socket and when I try to connect to it with my client app I get exception: 
  <code>The server mode SSL must use a certificate with the associated private key</code></p>
  
  <p>Indeed my certificate's PrivateKey property is empty. Did I import my certificate incorrect or should I do something with the certificate before importing it into the store?</p>
  
  <p>My server authentication code looks like that:</p>
  
  <pre><code>stream.AuthenticateAsServerAsync(certificate, false, SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12, true);
  </code></pre>