Git Product home page Git Product logo

secure-sockets's Introduction

Playing with TLS 1.2 connections over raw TCP sockets.

Should work out of the box with Ruby >= 2.2 and Go >= 1.5.

Running

Run ./create-cert.sh, get the paths for the cert and key files: cert/cert_*.pem and cert/key_*.pem.

Start the Ruby server:

$ ruby ruby/server.rb -c cert/cert.pem -k cert/key.pem
[server 2019-02-02 10:00:00 -0000] preparing context
[server 2019-02-02 10:00:00 -0000] starting server
[server 2019-02-02 10:00:00 -0000] ready! listening on port 9953

The server is running.

Start the client (Ruby does send / receive, go is send-only right now):

$ ruby ruby/client.rb -c cert/cert_2019-02-02.pem
creating ssl session
creating socket
connected! Send `quit` to quit.
>

Start a bunch of clients. They can chat! It's TLS!

Why?

Just playing with these tools. I rely on them to keep working without intervention, it's probably a good idea for me to figure out how they work.

For now it's building something that works and then changing pieces of it to see how it breaks.

  • Adam Bachman, 2016-Feb

secure-sockets's People

Contributors

abachman avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.