From fa28464865746aae838fbf48bbc2d7fe9e656adbcf20d1fd06bf919cee69fdf0 Mon Sep 17 00:00:00 2001 From: Michal Srb Date: Tue, 18 Jul 2017 08:35:55 +0000 Subject: [PATCH] Accepting request 511092 from home:michalsrb:branches:X11:XOrg - Change with-vnc-key.sh to generate TLS certificate using current hostname. (bnc#1041847) OBS-URL: https://build.opensuse.org/request/show/511092 OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/tigervnc?expand=0&rev=113 --- tigervnc.changes | 6 ++++++ tigervnc.spec | 2 ++ with-vnc-key.sh | 3 ++- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/tigervnc.changes b/tigervnc.changes index ecafbd7..01671b2 100644 --- a/tigervnc.changes +++ b/tigervnc.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jul 7 08:06:00 UTC 2017 - msrb@suse.com + +- Change with-vnc-key.sh to generate TLS certificate using current + hostname. (bnc#1041847) + ------------------------------------------------------------------- Fri Jun 9 11:03:23 UTC 2017 - tchvatal@suse.com diff --git a/tigervnc.spec b/tigervnc.spec index a3c04aa..ccd768b 100644 --- a/tigervnc.spec +++ b/tigervnc.spec @@ -143,6 +143,8 @@ Requires: xinit Requires: xkbcomp Requires: xkeyboard-config Requires: xorg-x11-fonts-core +# For the with-vnc-key.sh script +Requires: /bin/hostname Provides: xorg-x11-Xvnc:/usr/lib/vnc/with-vnc-key.sh Summary: TigerVNC implementation of Xvnc Group: System/X11/Servers/XF86_4 diff --git a/with-vnc-key.sh b/with-vnc-key.sh index 14a43f6..d7a400c 100644 --- a/with-vnc-key.sh +++ b/with-vnc-key.sh @@ -24,7 +24,8 @@ fi # If the cert file doesn't exist, generate it. if ! test -e $TLSCERT ; then - CN="Automatically generated certificate for the VNC service" + # Keeping it short, because hostname could be long and max CN is 64 characters + CN="VNC service on `hostname`" openssl req -new -x509 -extensions usr_cert -key $TLSKEY -out $TLSCERT -days 7305 -subj "/CN=$CN/" chown vnc:vnc $TLSCERT fi