Skip to content

Instantly share code, notes, and snippets.

@murachi1208
Last active January 15, 2020 07:17
Show Gist options
  • Save murachi1208/00447a9d8267425f1b7d to your computer and use it in GitHub Desktop.
Save murachi1208/00447a9d8267425f1b7d to your computer and use it in GitHub Desktop.
初めてのSSL証明書作成(CoreSSL)と、Apacheに組み込んでSSLチェックツールで「A」とるまでのながれ ref: https://qiita.com/murachi1208/items/fb8e7adc54250008c699
# openssl md5 /bin/* > rand.dat
# openssl genrsa -rand rand.dat -out server.key 2048
# 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 []:
# 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 ← 中間証明書の内容を貼り付ける
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
$ curl -kvI https://どめいん
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
$ 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