Browse Source

Use makecert for xmpp

Bob Mottram 10 years ago
parent
commit
a4b48f92c4
1 changed files with 10 additions and 18 deletions
  1. 10
    18
      beaglebone.txt

+ 10
- 18
beaglebone.txt View File

3958
 Generate a SSL certificate.
3958
 Generate a SSL certificate.
3959
 
3959
 
3960
 #+BEGIN_SRC: bash
3960
 #+BEGIN_SRC: bash
3961
-openssl genrsa -out /etc/ssl/private/xmpp.key 4096
3962
-openssl req -new -x509 -sha256 -key /etc/ssl/private/xmpp.key -out /etc/ssl/certs/xmpp.crt -days 3650
3963
-#+END_SRC
3964
-
3965
-Change permissions.
3966
-
3967
-#+BEGIN_SRC: bash
3968
-chmod 600 /etc/ssl/private/xmpp.key
3969
-chmod 600 /etc/ssl/certs/xmpp.crt
3961
+makecert xmpp
3962
+chown prosody:prosody /etc/ssl/private/xmpp.key
3963
+chown prosody:prosody /etc/ssl/certs/xmpp.*
3970
 #+END_SRC
3964
 #+END_SRC
3971
 
3965
 
3972
 Install Prosody.
3966
 Install Prosody.
3984
 Set the ssl section to:
3978
 Set the ssl section to:
3985
 
3979
 
3986
 #+BEGIN_SRC: bash
3980
 #+BEGIN_SRC: bash
3987
-	ssl = {
3988
-		key = "/etc/ssl/private/xmpp.key";
3989
-		certificate = "/etc/ssl/certs/xmpp.crt";
3990
-		}
3981
+    ssl = {
3982
+        key = "/etc/ssl/private/xmpp.key";
3983
+        certificate = "/etc/ssl/certs/xmpp.crt";
3984
+        dhparam = "/etc/ssl/certs/xmpp.dhparam";
3985
+    }
3991
 #+END_SRC
3986
 #+END_SRC
3992
 
3987
 
3993
 And also append the following:
3988
 And also append the following:
7736
 Recreate the XMPP certificate:
7731
 Recreate the XMPP certificate:
7737
 
7732
 
7738
 #+BEGIN_SRC: bash
7733
 #+BEGIN_SRC: bash
7739
-openssl genrsa -out /etc/ssl/private/xmpp.key 4096
7740
-openssl req -new -sha256 -x509 -key /etc/ssl/private/xmpp.key -out /etc/ssl/certs/xmpp.crt -days 3650
7741
-chmod 600 /etc/ssl/private/xmpp.key
7742
-chmod 600 /etc/ssl/certs/xmpp.crt
7734
+makecert xmpp
7743
 chown prosody:prosody /etc/ssl/private/xmpp.key
7735
 chown prosody:prosody /etc/ssl/private/xmpp.key
7744
-chown prosody:prosody /etc/ssl/certs/xmpp.crt
7736
+chown prosody:prosody /etc/ssl/certs/xmpp.*
7745
 #+END_SRC
7737
 #+END_SRC
7746
 
7738
 
7747
 And regenerate the IRC server keys:
7739
 And regenerate the IRC server keys: