Skip to content

Instantly share code, notes, and snippets.

View celalo's full-sized avatar

Celal Baris Ozdemir celalo

View GitHub Profile
@celalo
celalo / README.md
Created January 17, 2021 03:05 — forked from pcan/README.md
Node.js plain TLS Client & Server, 2-way Cert Auth

Node.js TLS plain TLS sockets

This guide shows how to set up a bidirectional client/server authentication for plain TLS sockets.

Newer versions of openssl are stricter about certificate purposes. Use extensions accordingly.

Prepare certificates

Generate a Certificate Authority:

@celalo
celalo / self-signed-certificate-with-custom-ca.md
Created January 17, 2021 03:04 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@celalo
celalo / ca.md
Created January 17, 2021 03:04 — forked from soarez/ca.md
How to setup your own CA with OpenSSL

How to setup your own CA with OpenSSL

For educational reasons I've decided to create my own CA. Here is what I learned.

First things first

Lets get some context first.