Last active
January 15, 2020 07:17
-
-
Save murachi1208/00447a9d8267425f1b7d to your computer and use it in GitHub Desktop.
初めてのSSL証明書作成(CoreSSL)と、Apacheに組み込んでSSLチェックツールで「A」とるまでのながれ ref: https://qiita.com/murachi1208/items/fb8e7adc54250008c699
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# openssl md5 /bin/* > rand.dat | |
# openssl genrsa -rand rand.dat -out server.key 2048 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# openssl req -new -sha256 -key server.key -out server.csr | |
Country Name (2 letter code) [XX]:JP | |
State or Province Name (full name) []:都道府県名 | |
Locality Name (eg, city) [Default City]:市区町村名 | |
Organization Name (eg, company) [Default Company Ltd]:組織名 | |
Organizational Unit Name (eg, section) []: | |
Common Name (eg, your name or your server's hostname) []:コモンネーム | |
Email Address []: | |
Please enter the following 'extra' attributes | |
to be sent with your certificate request | |
A challenge password []: | |
An optional company name []: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mkdir -p /etc/httpd/conf/ssl/crt | |
# cd /etc/httpd/conf/ssl/crt | |
# cp server.key my.domain.key | |
# vi my.domain.crt ← CERT(SSL証明書)の内容を貼り付ける | |
# vi my.domain.inter.crt ← 中間証明書の内容を貼り付ける |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SSLEngine on | |
SSLCertificateKeyFile /etc/httpd/conf/ssl/crt/my.domain.key | |
SSLCertificateFile /etc/httpd/conf/ssl/crt/my.domain.crt | |
SSLCACertificateFile /etc/httpd/conf/ssl/crt/my.domain.inter.crt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl -kvI https://どめいん |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SSLEngine on | |
SSLProtocol all -SSLv2 -SSLv3 | |
SSLHonorCipherOrder ON | |
SSLCipherSuite EECDH+HIGH:EDH+HIGH:HIGH:MEDIUM:+3DES:!ADH:!RC4:!MD5:!aNULL:!eNULL:!SSLv2:!LOW:!EXP:!PSK:!SRP:!DSS:!KRB5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ openssl s_client -connect localhost:443 -showcerts < /dev/null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment