/tlshandshakingwithdotnetcore

A repository containing a TCP server written on .net core working to establish a secure TLS channel

Primary LanguageC#

tls handshaking with dotnet core

A repository containing a client and a server working together at TCP level to establish a secure TLS channel.

Useful links:

https://blogs.msdn.microsoft.com/kaushal/2013/08/02/ssl-handshake-and-https-bindings-on-iis/

http://www.c-sharpcorner.com/article/building-a-tcp-server-in-net-core-on-ubuntu/

https://msdn.microsoft.com/en-us/library/system.net.security.sslstream(v=vs.110).aspx

http://www.codeguru.com/columns/dotnet/using-secure-sockets-in-.net.html

https://msdn.microsoft.com/en-us/library/system.net.security.sslstream(v=vs.110).aspx

https://stackoverflow.com/questions/11199099/openssl-and-s-client-why-is-a-private-key-required-from-the-client

Userful terminal commands:

start handshaking with the server: openssl s_client -tls1 -connect 127.0.0.1:5678 -msg

creates self signed certificate: openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365

Convert PEM & Private Key to PFX/P12: openssl pkcs12 -export -out cert.pfx -inkey key.pem -in cert.pem

openssl s_client -cert "/Users/albertodenatale/.dotnet/corefx/cryptography/x509stores/my/cert.pem" -key "/Users/albertodenatale/.dotnet/corefx/cryptography/x509stores/my/key.pem" -tls1 -connect 127.0.0.1:5678 -state -debug