Quantcast
Channel: プログラム の個人的なメモ
Viewing all articles
Browse latest Browse all 860

【Openssl】【Linux】 Openssl での証明書作成

$
0
0

前提条件

OpenSSLのインストール

 * 以下の関連記事を参照のこと
http://blogs.yahoo.co.jp/dk521123/33899152.html

【1】Webサーバの秘密鍵の生成

openssl genrsa -des 1024 > 【サーバの秘密鍵ファイル】で作成する
openssl genrsa -des 1024 > server.key

Generating RSA private key, 1024 bit long modulus
..............++++++
..............................++++++
e is 65537 (0x10001)
Enter pass phrase:【任意のパスフレーズを入力】
Verifying - Enter pass phrase:【任意のパスフレーズを再度入力】

【2】Webサーバの公開鍵の生成

openssl req -new -key 【サーバの秘密鍵ファイル】 > 【サーバの公開鍵ファイル】
openssl req -new -key server.key > server.csr
Enter pass phrase for server.key:
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
色々聞かれるので、それぞれ入力する
Common Name (eg, your name or your server's hostname) []:【ここはサーバのホスト名】
・・・

【3】(オレオレ)証明書の作成

openssl x509 -in server.csr -req -signkey server.key > server.crt
Enter pass phrase for server.key:【【1】のパスフレーズを入力】

実際の利用例

Linux上の Apache でSSL通信を行う
 * 以下の関連記事を参照のこと
http://blogs.yahoo.co.jp/dk521123/36499526.html


関連記事

Windows上での Opensslの設定と自己証明書作成

http://blogs.yahoo.co.jp/dk521123/32723492.html

Linux上の Apache でSSL通信を行う

http://blogs.yahoo.co.jp/dk521123/36499526.html

Viewing all articles
Browse latest Browse all 860

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>