diff options
author | Pavel Roskin <plroskin@gmail.com> | 2016-11-18 03:53:54 +0000 |
---|---|---|
committer | Pavel Roskin <plroskin@gmail.com> | 2016-11-18 03:59:37 +0000 |
commit | 401612fd1d0c0df450bb51cf2bcdbb1b3f08bc0a (patch) | |
tree | 3030402af94526a922c70afb612d4b11e9dbcb78 /keygen | |
parent | f7b0b0d89c96160e77a2a57bed4bb6a887b32af6 (diff) | |
download | xrdp-proprietary-401612fd1d0c0df450bb51cf2bcdbb1b3f08bc0a.tar.gz xrdp-proprietary-401612fd1d0c0df450bb51cf2bcdbb1b3f08bc0a.zip |
Fix "unable to find 'distinguished_name' in config" with older openssl
This also fixes "make distcheck", which expects "make uninstall" to
remove all installed files.
Diffstat (limited to 'keygen')
-rw-r--r-- | keygen/Makefile.am | 15 | ||||
-rw-r--r-- | keygen/openssl.conf | 4 |
2 files changed, 17 insertions, 2 deletions
diff --git a/keygen/Makefile.am b/keygen/Makefile.am index e77fe24e..014e8df9 100644 --- a/keygen/Makefile.am +++ b/keygen/Makefile.am @@ -1,3 +1,4 @@ +EXTRA_DIST = openssl.conf AM_CPPFLAGS = \ -DXRDP_CFG_PATH=\"${sysconfdir}/xrdp\" \ @@ -18,8 +19,18 @@ xrdpsysconfdir = $(sysconfdir)/xrdp install-data-hook: umask 077 && \ - if [ ! -f $(DESTDIR)$(xrdpsysconfdir)/rsakeys.ini ]; then ./xrdp-keygen xrdp $(DESTDIR)$(xrdpsysconfdir)/rsakeys.ini; fi && \ - if [ ! -f $(DESTDIR)$(xrdpsysconfdir)/cert.pem ]; then openssl req -x509 -newkey rsa:2048 -sha256 -nodes -keyout $(DESTDIR)$(xrdpsysconfdir)/key.pem -out $(DESTDIR)$(xrdpsysconfdir)/cert.pem -days 365 -subj /C=US/ST=CA/L=Sunnyvale/O=xrdp/CN=www.xrdp.org; fi + if [ ! -f $(DESTDIR)$(xrdpsysconfdir)/rsakeys.ini ]; then \ + ./xrdp-keygen xrdp $(DESTDIR)$(xrdpsysconfdir)/rsakeys.ini; \ + fi && \ + if [ ! -f $(DESTDIR)$(xrdpsysconfdir)/cert.pem ]; then \ + openssl req -x509 -newkey rsa:2048 -sha256 -nodes \ + -keyout $(DESTDIR)$(xrdpsysconfdir)/key.pem -out \ + $(DESTDIR)$(xrdpsysconfdir)/cert.pem -days 365 \ + -subj /C=US/ST=CA/L=Sunnyvale/O=xrdp/CN=www.xrdp.org \ + -config $(srcdir)/openssl.conf; \ + fi uninstall-hook: rm -f $(DESTDIR)$(xrdpsysconfdir)/rsakeys.ini + rm -f $(DESTDIR)$(xrdpsysconfdir)/cert.pem + rm -f $(DESTDIR)$(xrdpsysconfdir)/key.pem diff --git a/keygen/openssl.conf b/keygen/openssl.conf new file mode 100644 index 00000000..79b1dfb4 --- /dev/null +++ b/keygen/openssl.conf @@ -0,0 +1,4 @@ +[req] +distinguished_name = req_distinguished_name + +[req_distinguished_name] |