Locked History Actions

Diff for "ssl-cert"

Differences between revisions 9 and 10
Revision 9 as of 2018-11-13 04:46:27
Size: 3481
Revision 10 as of 2018-11-13 04:46:53
Size: 3482
Deletions are marked like this. Additions are marked like this.
Line 54: Line 54:
/etc/httpd/conf.d/ssl.conf中で指定。 /etc/httpd/conf.d/ssl.conf 中で指定。



1. opensslを使用してSHA1で署名する場合(期限10年)

openssl genrsa -out test.key 2048
openssl req -new -key test.key -x509 -days 3652 -out test.crt -sha1


openssl x509 -text -noout -in test.crt

Let's Encrypt SSL証明書の作成

参考 Let's Encrypt 総合Let's Encryptの使い方Let's Encrypt ユーザーガイド


1.certbotを epelからインストール

# yum install epel-release
# yum install certbot python-certbot-apache

2. httpdを停止して、初期の証明書ファイルを作成 (注:あらかじめ、SSL自己発行証明書でセキュリティ監査を受け、http/https は外部にopenしていること) -d の後に、証明したいホストのFQDNを記述する。

# systemctl stop httpd
# certbot certonly --standalone -d ribfnewhost.riken.jp

その後、自分のEmailアドレスを入力、規約を読み承諾(A)gree する。後半の選択(share your email address with the Electronic Frontier Foundation)は、必要があれば承諾する(無理に承諾する必要はない)その後、以下のようにSSL証明書が作成されるので、これらを /etc/httpd/conf.d/ssl.conf 中で指定。

Starting new HTTPS connection (1): supporters.eff.org
Starting new HTTPS connection (1): acme-v02.api.letsencrypt.org
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for ribfnewhost.riken.jp
Waiting for verification...
Cleaning up challenges

 - Congratulations! Your certificate and chain have been saved at:
   Your key file has been saved at:
   Your cert will expire on 2019-02-05. To obtain a new or tweaked
   version of this certificate in the future, simply run certbot
   again. To non-interactively renew *all* of your certificates, run
   "certbot renew"
 - If you like Certbot, please consider supporting our work by:

   Donating to ISRG / Let's Encrypt:   https://letsencrypt.org/donate
   Donating to EFF:                    https://eff.org/donate-le



certbot renew

を実行(certbot実行時は http/https は外部に対して openしている必要がある)