Skip to content

Instantly share code, notes, and snippets.

View BeeChains's full-sized avatar

xn--tbdhns/ | git.༕༞༑༙ BeeChains

View GitHub Profile
@buffrr
buffrr / x509-dane.md
Last active March 2, 2024 05:39
Generate an x509 certificate and a TLSA record with openssl

Creating a self-signed certificate for example.com (if you already have a certificate you can skip this step):

openssl req -x509 -newkey rsa:4096 -sha256 -days 365 -nodes \
  -keyout cert.key -out cert.crt -extensions ext  -config \
  <(echo "[req]"; 
    echo distinguished_name=req; 
    echo "[ext]";
 echo "keyUsage=critical,digitalSignature,keyEncipherment";