Skip to content

Instantly share code, notes, and snippets.

View 3ffon's full-sized avatar

Amit Triffon 3ffon

  • Anzu.io
  • Israel
View GitHub Profile
@3ffon
3ffon / README.md
Created February 25, 2020 23:32 — 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.

Prepare certificates

Generate a Certificate Authority:

openssl req -new -x509 -days 9999 -keyout ca-key.pem -out ca-crt.pem
@3ffon
3ffon / recursive_flatten_sub_folders.js
Created December 14, 2016 05:26
nodejs - flatten sub-folder's files with a prefix
/*
assumed direcotry structure:
/somedir
/AF3
/somefile.txt
/picture.jpg
/GD3
/file.txt
/picture.png