title: Secure Handshake failing (SSL)
body: <p>I'm usng a library called Lacewing. <a href="http://lacewing-project.org/" rel="nofollow">http://lacewing-project.org/</a></p>
  
  <p>It uses windows crypt api to make a secure server.</p>
  
  <p>I have created a certificate for my PC (Josh-Laptop), and I used netsh to bind it to port 8012. Lacewing says the certificate is successfully loaded.</p>
  
  <p>Then come the problems. I'm trying to send messages from 1 pc in my house (the host) to another (the client).</p>
  
  <p>When I do not load a certificate and use it in unsafe mode, all messages are sent and received.</p>
  
  <pre><code>    void ServerCore::onConnect( Lacewing::Server::Client &amp;client )
      {
          client.SendWritable("test");
      }
  
  ...
  
      void ServerCore::onReceive( 
          Lacewing::Server::Client &amp;client, char * data, int size )
      {
          getServer().FirstClient()-&gt;SendWritable("test");
          client.SendWritable("test");
          std::cout &lt;&lt; data &lt;&lt; " was received from " &lt;&lt; client.GetAddress().ToString() &lt;&lt; std::endl;
      }
  
      void ClientCore::onConnect()
      {
          getClient().Send("test");
      }
  
  
      void ClientCore::onReceive( char * data, int size )
      {
          getClient().Send("Okay then...");
          std::cout &lt;&lt; data &lt;&lt; std::endl;
      }
  </code></pre>
  
  <p>On the client side, I receive 'test'. On the server side, the library spits out an error saying "hand shake failed", "overlapped io operation is in progress"</p>
  
  <p>This is how I load the certificate:</p>
  
  <pre><code>getServer().LoadSystemCertificate("MY","JOSH-LAPTOP","localmachine");
  </code></pre>
  
  <p>Why would the handshake fail? Is there something I do not understand?
  Thanks</p>