浏览代码

Archive of certificates

Bob Mottram 11 年前
父节点
当前提交
33e3898932
共有 1 个文件被更改,包括 8 次插入5 次删除
  1. 8
    5
      beaglebone.txt

+ 8
- 5
beaglebone.txt 查看文件

@@ -2635,15 +2635,16 @@ Enter the following, changing the country code and location as needed:
2635 2635
 #!/bin/bash
2636 2636
 
2637 2637
 HOSTNAME=$1
2638
-COUNTRY_CODE="GB"
2639
-AREA="Greater Manchester"
2640
-LOCATION="Manchester"
2638
+COUNTRY_CODE="US"
2639
+AREA="Free Speech Zone"
2640
+LOCATION="Freedomville"
2641 2641
 ORGANISATION="Freedombone"
2642
+UNIT="Freedombone Unit"
2642 2643
 
2643 2644
 openssl req \
2644 2645
   -x509 -nodes -days 3650 \
2645
-  -subj "/O=$ORGANISATION/C=$COUNTRY_CODE/ST=$AREA/L=$LOCATION/CN=$HOSTNAME" \
2646
-  -newkey rsa:1024 \
2646
+  -subj "/O=$ORGANISATION/OU=$UNIT/C=$COUNTRY_CODE/ST=$AREA/L=$LOCATION/CN=$HOSTNAME" \
2647
+  -newkey rsa:2048 \
2647 2648
   -keyout /etc/ssl/private/$HOSTNAME.key \
2648 2649
   -out /etc/ssl/certs/$HOSTNAME.crt
2649 2650
 chmod 400 /etc/ssl/private/$HOSTNAME.key
@@ -2657,6 +2658,7 @@ fi
2657 2658
 cp /etc/ssl/certs/$HOSTNAME.crt /etc/ssl/mycerts
2658 2659
 # Create a bundle of your certificates
2659 2660
 cat /etc/ssl/mycerts/*.crt > /etc/ssl/freedombone-bundle.crt
2661
+tar -czvf /etc/ssl/freedombone-certs.tar.gz /etc/ssl/mycerts/*.crt
2660 2662
 #+END_SRC
2661 2663
 
2662 2664
 Save and exit.
@@ -8252,6 +8254,7 @@ And also add it to the overall bundle of certificates for the BBB. This will all
8252 8254
 mkdir /etc/ssl/mycerts
8253 8255
 cp /etc/ssl/certs/$HOSTNAME.bundle.crt /etc/ssl/mycerts
8254 8256
 cat /etc/ssl/mycerts/*.crt > /etc/ssl/freedombone-bundle.crt
8257
+tar -czvf /etc/ssl/freedombone-certs.tar.gz /etc/ssl/mycerts/*.crt
8255 8258
 #+END_SRC
8256 8259
 
8257 8260
 Edit your configuration file.