Certificate Related Things

Some stuff related to certificates

Creating a root CA

Securing a server with AltName extension

SYSNAME=xxx
DOMAIN=yyy
openssl x509 \
  -req \
  -days 3650 \
  -in "${SYSNAME}.csr" \
  -CA rootCA.crt \
  -CAkey rootCA.key \
  -set_serial 01 \
  -out "${SYSNAME}.crt" \
  -extensions v3_ca \
  -extfile <(echo "[v3_ca]"; echo "extendedKeyUsage=serverAuth"; echo "subjectAltName=DNS:${DOMAIN}")

Securing Miktotik Router

/certificate import file-name=fehervari-router.crt
/certificate import file-name=fehervari-router.key
/ip service set www-ssl certificate=fehervari-router.crt_0
/ip service enable www-ssl
/ip service disable www