From ea0e66cff5ed26a37dbc18444f073a6eba68b03c Mon Sep 17 00:00:00 2001 From: iliajie Date: Mon, 10 Oct 2022 21:32:44 +0300 Subject: [PATCH] Fix self-signed certificate work in Chrome (on MacOS) --- setup.pl | 2 +- setup.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.pl b/setup.pl index a145abd0d..b86a1d99a 100755 --- a/setup.pl +++ b/setup.pl @@ -491,7 +491,7 @@ else { $host = &get_system_hostname(); $cert = &tempname(); $key = &tempname(); - open(SSL, "| openssl req -newkey rsa:2048 -x509 -nodes -out $cert -keyout $key -days 1825 -sha256 -subj '/CN=$host/C=US/L=Santa Clara' -addext subjectAltName=DNS:$host,DNS:localhost >/dev/null 2>&1"); + open(SSL, "| openssl req -newkey rsa:2048 -x509 -nodes -out $cert -keyout $key -days 1825 -sha256 -subj '/CN=$host/C=US/L=Santa Clara' -addext subjectAltName=DNS:$host,DNS:localhost -addext extendedKeyUsage=serverAuth >/dev/null 2>&1"); print SSL ".\n"; print SSL ".\n"; print SSL ".\n"; diff --git a/setup.sh b/setup.sh index 26054080e..41025a1c3 100755 --- a/setup.sh +++ b/setup.sh @@ -599,7 +599,7 @@ else openssl version >/dev/null 2>&1 if [ "$?" = "0" ]; then # We can generate a new SSL key for this host - openssl req -newkey rsa:2048 -x509 -nodes -out $tempdir/cert -keyout $tempdir/key -days 1825 -sha256 -subj "/CN=$host/C=US/L=Santa Clara" -addext subjectAltName=DNS:$host,DNS:localhost >/dev/null 2>&1 </dev/null 2>&1 <