Use makecert for irc

This commit is contained in:
Bob Mottram 2014-09-14 15:42:36 +01:00
parent deebb07cb8
commit 6cfc81d86c
1 changed files with 12 additions and 19 deletions

View File

@ -3357,22 +3357,11 @@ Create some ssl certificates:
#+BEGIN_SRC: bash #+BEGIN_SRC: bash
mkdir /home/ircserver/ircd/ssl mkdir /home/ircserver/ircd/ssl
openssl genrsa -out /home/ircserver/ircd/ssl/ircd.key 4096 makecert ircd
openssl req -new -x509 -sha256 -key /home/ircserver/ircd/ssl/ircd.key -out /home/ircserver/ircd/ssl/ircd.pem -days 3650 mv /etc/ssl/private/ircd.key /home/ircserver/ircd/ssl/
#+END_SRC mv /etc/ssl/certs/ircd.crt /home/ircserver/ircd/ssl/ircd.pem
mv /etc/ssl/certs/ircd.dhparam /home/ircserver/ircd/ssl/dhparam.pem
You will be asked for some details. The next step will take a few minutes to gather entropy, so go and do something else. chmod 640 /home/ircserver/ircd/ssl/*
#+BEGIN_SRC: bash
openssl dhparam -out /home/ircserver/ircd/ssl/dhparam.pem 1024
#+END_SRC
Now alter the permissions on the files so that they're accessible to the /ircserver/ user:
#+BEGIN_SRC: bash
chmod 600 /home/ircserver/ircd/ssl/ircd.key
chmod 600 /home/ircserver/ircd/ssl/ircd.pem
chmod 600 /home/ircserver/ircd/ssl/dhparam.pem
chown -R ircserver:ircserver /home/ircserver/ircd chown -R ircserver:ircserver /home/ircserver/ircd
chown -R ircserver:ircserver /home/ircserver/services chown -R ircserver:ircserver /home/ircserver/services
#+END_SRC #+END_SRC
@ -7757,9 +7746,13 @@ chown prosody:prosody /etc/ssl/certs/xmpp.crt
And regenerate the IRC server keys: And regenerate the IRC server keys:
#+BEGIN_SRC: bash #+BEGIN_SRC: bash
openssl genrsa -out /home/ircserver/ircd/ssl/ircd.key 4096 makecert ircd
openssl req -new -x509 -sha256 -key /home/ircserver/ircd/ssl/ircd.key -out /home/ircserver/ircd/ssl/ircd.pem -days 3650 mv /etc/ssl/private/ircd.key /home/ircserver/ircd/ssl/
openssl dhparam -out /home/ircserver/ircd/ssl/dhparam.pem 1024 mv /etc/ssl/certs/ircd.crt /home/ircserver/ircd/ssl/ircd.pem
mv /etc/ssl/certs/ircd.dhparam /home/ircserver/ircd/ssl/dhparam.pem
chmod 640 /home/ircserver/ircd/ssl/*
chown -R ircserver:ircserver /home/ircserver/ircd
chown -R ircserver:ircserver /home/ircserver/services
#+END_SRC #+END_SRC
This will take a few minutes to gather entropy. This will take a few minutes to gather entropy.