wok rev 24090

xrdp: remove private keys (thanks Chocimier)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Jul 12 17:43:25 2021 +0000 (2021-07-12)
parents 254e01fe513b
children 9849335f0b73
files xrdp/receipt
line diff
     1.1 --- a/xrdp/receipt	Mon Jul 12 09:17:44 2021 +0000
     1.2 +++ b/xrdp/receipt	Mon Jul 12 17:43:25 2021 +0000
     1.3 @@ -11,7 +11,7 @@
     1.4  TARBALL="$PACKAGE-$VERSION.tar.gz"
     1.5  WGET_URL="https://github.com/neutrinolabs/$PACKAGE/releases/download/v$VERSION/$TARBALL"
     1.6  
     1.7 -DEPENDS="libssl pam util-linux-uuid xorg-libICE xorg-libSM xorg-libX11 
     1.8 +DEPENDS="openssl pam util-linux-uuid xorg-libICE xorg-libSM xorg-libX11 
     1.9  	xorg-libXext xorg-libXfixes xorg-libXrandr xorgxrdp zlib"
    1.10  BUILD_DEPENDS="autoconf automake libtool nasm openssl-dev pam-dev 
    1.11  	pkg-config util-linux-uuid-dev xorg-dev"
    1.12 @@ -64,4 +64,16 @@
    1.13  	SESSION="/usr/bin/lxde-session"
    1.14  	sed -i "s|xterm|[ -x $SESSION ] \\&\\& exec $SESSION\\n &|" \
    1.15  		$fs/etc/xrdp/startwm.sh
    1.16 +
    1.17 +	rm -f $fs/etc/xrdp/rsakeys.ini $fs/etc/xrdp/key.pem $fs/etc/xrdp/cert.pem
    1.18  }
    1.19 +
    1.20 +# Pre and post install commands for Tazpkg.
    1.21 +post_install()
    1.22 +{
    1.23 +	chroot $1/ xrdp-keygen xrdp /etc/xrdp/rsakeys.ini
    1.24 +	chroot $1/ openssl req -x509 -newkey rsa:2048 -sha256 -nodes \
    1.25 +		-keyout /etc/xrdp/key.pem -out /etc/xrdp/cert.pem -days 365 \
    1.26 +		-subj /C=US/ST=CA/L=Sunnyvale/O=xrdp/CN=www.xrdp.org \
    1.27 +		-config /etc/ssl/openssl.conf
    1.28 +}