オレオレ証明書を作るコマンド

2017/04/21

オレオレ証明書を作るコマンド

$ openssl genrsa 2048 > server.key
$ openssl req -new -key server.key > server.csr

    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]:OSCA
    Organizational Unit Name (eg, section) []:
    Common Name (eg, your name or your server's hostname) []:weblabo.oscasierra.net
    Email Address []:

    Please enter the following 'extra' attributes
    to be sent with your certificate request
    A challenge password []:
    An optional company name []:

$ openssl x509 -days 3650 -req -signkey server.key < server.csr > server.crt
  • hostnameをサイトIPに合わせに設定

参考サイト

Post Directory