浏览代码

debian: add SAN when generating self-signed certs

Closes: #5547
j8
egerardus 4 年前
父节点
当前提交
76eabf1f29
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 6 次插入2 次删除
  1. 6
    2
      debian/jitsi-meet-web-config.postinst

+ 6
- 2
debian/jitsi-meet-web-config.postinst 查看文件

@@ -91,10 +91,14 @@ case "$1" in
91 91
                 CERT_CRT="/etc/jitsi/meet/$JVB_HOSTNAME.crt"
92 92
                 HOST="$( (hostname -s; echo localhost) | head -n 1)"
93 93
                 DOMAIN="$( (hostname -d; echo localdomain) | head -n 1)"
94
-                openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj \
94
+                openssl req -new -newkey rsa:4096 -days 3650 -nodes -x509 -subj \
95 95
                     "/O=$DOMAIN/OU=$HOST/CN=$JVB_HOSTNAME/emailAddress=webmaster@$HOST.$DOMAIN" \
96 96
                     -keyout $CERT_KEY \
97
-                    -out $CERT_CRT
97
+                    -out $CERT_CRT \
98
+                    -reqexts SAN \
99
+                    -extensions SAN \
100
+                    -config <(cat /etc/ssl/openssl.cnf \
101
+                        <(printf '[SAN]\nsubjectAltName=DNS:localhost,DNS:$JVB_HOSTNAME,IP:$JVB_HOSTNAME')) \
98 102
             fi
99 103
         fi
100 104
 

正在加载...
取消
保存