Bind SSL certificate to local port for Mono/OWIN I have a local http service application running on OSX (hosted through Mono/OWIN) that I want to access on https instead.  The service itself is easily configured to require https, but the local bit is causing trouble.

On Windows I solved this by binding an SSLCert to the local port with the command


  netsh http add sslcert ipport=0.0.0.0:8000 appid={xyzw} certhash=XYZW


which then means any access to https://127.0.0.1:8000 is verified against the given certificate and allowed.

I have no idea where to look for the OSX equivalent though.  Most references to SSL certificates are in the context of Apache, which is not involved in my use case, and tools like iwconfig or others I've looked at don't seem to have the required functionality.
In OS X, the process responsible for accepting incoming connections is responsible for setting up and enforcing SSL/TLS. In most cases this will be a web server like Apache's httpd or nginx.

Take a look at SignalR and HTTPS for links and help to enable SSL support in signalR services.

Stunnel

If you can not enable SSL within your service, consider using stunnel:


  Stunnel is a proxy designed to add TLS encryption functionality to existing clients and servers without any changes in the programs' code. Its architecture is optimized for security, portability, and scalability (including load-balancing), making it suitable for large deployments.


Install with brew

stunnel is available through Homebrew. Once brew is installed, install stunnel using:

brew install stunnel