Search code examples
wcfsslhttpscertificateself-signed

WCF HTTPS OpenSSL failed to connect write:errno=54


I've a WCF project and just started to integrate endpoints listening to https. For testing I've created a self-signed certificate using this article.

The certificate is valid: enter image description here

Now I'm trying to consume the services that are listening to https, but the connection via OpenSSL command line tools fails:

CONNECTED(00000003)
write:errno=54

Also the -debug switch does not give any information. Furthermore I've configured wcf tracing in order to resolve the error. This gives me only information about the endpoint is listening to https but not anything about the connection error.

Can you please help me?


Solution

  • There was an issue with the certificate. I've now created a CA certificate, intermediate (in order to support 2-step-validation) and the service certificate.

    Furthermore it was necessary to link the certificate with the port of the service using netsh (netsh http add sslcert ipport=0.0.0.0:[your_port] certhash=[hash_of_cert] appid=[uuid]