忍者ブログ
出来損ないのカメレオン

SSL

Country Name : JP
Common Name   Webサーバの完全なドメイン名です。この名前は完全一致が必要となります。 URL(www.xxx.jp)
Organization 組織の法律上の正式名称です。この名前は省略できません。 xxx株式会社 xxx K.K.
Organization Unit 部署名 SSL section
City or Locality 法律上、組織が置かれている市区町村です。  minatoku
State or Province 法律上、組織が置かれている都道府県です。省略できません。 Tokyo
Country 組織が存在する国を示す2文字のISO略語です。 JP

---------------------------------------------------

SSLはnamebased virtual hostが効かない為、IPを割り振る
IPは全てNATしている為、ルータからポート毎にマッピングする
DNSのレコードも、振ったIPに書き換える

CSR作成

cd /usr/local/apache2/conf/ssl
openssl req -new -nodes -keyout domainname.key -out domainname.csr

openssl req -new -nodes -keyout resourcegate.key -out resourcegate.csr


[情報を入力。Common Nameに要求するFDQNを記述]
/usr/local/apache2/conf/ssl/domainname.crtにCAからの証明書を保存
/usr/localapache2/conf/vhosts/vhosts.confに新しい設定を追記:

-----------------------------------------------------------------

SSL設定
NameVirtualHost 192.168.0.1:443
<VirtualHost 192.168.0.1:443>
        SSLEngine on
        SSLOptions +StdEnvVars
        SSLCertificateFile conf/ssl/domainname.crt
        SSLCertificateKeyFile conf/ssl/domainname.key
        SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
        ServerName www.domainname
        DocumentRoot /usr/local/www/www.rdomainname/htdocs
        ScriptAlias  /usr/local/www/www.domainname/cgi-bin/
</VirtualHost>


*openssl x509 -text -in crt.txt

秘密鍵の内容を確認
 openssl rsa -in key.pem -text
CSRの内容を確認
 openssl req -inform der -in req.der -text
 openssl req -in req.pem -text
証明書の内容を確認
 openssl x509 -inform der -in cer.der -text
 openssl x509 -in cer.pem -text
CRLの内容を確認
 openssl crl -inform der -in crl.der -text
 openssl crl -in crl.pem -text

 

PR
ブログ内検索
Counter


カレンダー
02 2025/03 04
S M T W T F S
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31
忍者ブログ [PR]