2016年1月23日土曜日

オレオレ証明書の作り方

備忘録として。環境はCentOS6+OpenSSL。

$ openssl genrsa 2048 > test.key
$ openssl req -key test.key -new -x509 -days 3650 -out test.cer
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.
-----
Country Name (2 letter code) [XX]:JP
State or Province Name (full name) []:Tokyo
Locality Name (eg, city) [Default City]:Minato-ku
Organization Name (eg, company) [Default Company Ltd]:OreOre Co., Ltd.
Organizational Unit Name (eg, section) []:
Common Name (eg, your name or your server's hostname) []:www.example.com
Email Address []:
$ ls
test.cer  test.key
$ cat test.key test.cer > test.pem
$ ls
test.cer  test.key  test.pem

このtest.pemを使ってhaproxyのSSL Terminationを試してみよう。。。

1 件のコメント :

  1. Is poker or a bad game? – DRMDB
    a 여주 출장안마 friend who 수원 출장마사지 runs a poker game in 영천 출장마사지 poker rooms at one of the most trusted 당진 출장샵 names in 파주 출장샵 the poker world, and you play against other people

    返信削除