title: Handshaking to HTTPS with error:SSL connect error in Windows
body: <p>My request to HTTPS server is failing with the following errors</p>
  
  <pre><code>[25-05-2020 01-40-41Z] Level:Error Tag:AttestatationClientLib attest::curl::SendRequest:335 Failed sending curl request with error:SSL connect error
  [25-05-2020 01-40-41Z] Level:Error Tag:AttestatationClientLib AttestationClientImpl::sendHttpRequest:453 Failed to send http request with error:Failed sending curl request with error:SSL connect error
  [25-05-2020 01-40-41Z] Level:Error Tag:AttestatationClientLib AttestationClientImpl::sendAttestationRequest:243 Failed to send http request with error:Failed sending curl request with error:SSL connect error
  [25-05-2020 01-40-41Z] Level:Error Tag:AttestatationClientLib AttestationClientImpl::Attest:100 Failed to send attestation request with error:Failed sending curl request with error:SSL connect error
  [25-05-2020 01-40-41Z] Level:Error Tag:AttestatationClient Client::AttestAndDecrypt:82 Failed to attest with error:-7 description:Failed sending curl request with error:SSL connect error
  </code></pre>
  
  <p>Basically whenever I am trying to connect it is asking me to enter the system PIN and ask for credentials. Since the Hello pin is not set for this system I am not sure what values to give. This is leading to invalid credentials and may be not letting the SSL access the windows Native CA. Screen shot below, </p>
  
  <p><a href="https://i.stack.imgur.com/PMK15.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PMK15.png" alt="enter image description here"></a></p>
  
  <p>I enabled the trace on curl request and it pointed out that these failures are during handshake, which mean it could be related to cert validation, chain validation or access to the CA Store.</p>
  
  <p>Logs after enabling the trace</p>
  
  <pre><code>* TCP_NODELAY set
  * Connected to tamtam.abb.attest.xxxx.net (10.89.41.14) port 443 (#0)
  * schannel: SSL/TLS connection with tamtam.abb.attest.xxxx.net port 443 (step 1/3)
  * schannel: checking server certificate revocation
  * schannel: sending initial handshake data: sending 195 bytes...
  * schannel: sent initial handshake data: sent 195 bytes
  * schannel: SSL/TLS connection with tamtam.abb.attest.xxxx.net port 443 (step 2/3)
  * schannel: failed to receive handshake, need more data
  * schannel: SSL/TLS connection with tamtam.abb.attest.xxxx.net port 443 (step 2/3)
  * schannel: encrypted data got 4096
  * schannel: encrypted data buffer: offset 4096 length 4096
  * schannel: received incomplete message, need more data
  * schannel: SSL/TLS connection with tamtam.abb.attest.xxxx.net port 443 (step 2/3)
  * schannel: encrypted data got 1024
  * schannel: encrypted data buffer: offset 5120 length 5120
  * schannel: received incomplete message, need more data
  * schannel: SSL/TLS connection with tamtam.abb.attest.xxxx.net port 443 (step 2/3)
  * schannel: encrypted data got 865
  * schannel: encrypted data buffer: offset 5985 length 6144
  * schannel: sending next handshake data: sending 4132 bytes...
  * schannel: SSL/TLS connection with tamtam.abb.attest.xxxx.net port 443 (step 2/3)
  * schannel: failed to receive handshake, SSL/TLS connection failed
  * Closing connection 0
  * schannel: shutting down SSL/TLS connection with tamtam.abb.attest.xxxx.net port 443
  * schannel: clear security context handle
  </code></pre>
  
  <p>EDIT: **************************************</p>
  
  <p>Further investigation showed that I would want to know how to disable the client sending the cert for peer certification?</p>