LoginSignup
6
1

More than 5 years have passed since last update.

opensslコマンドで自己証明書をいっぱつで作成する

Posted at

openssl コマンドの -subj オプションを使うとインタラクティブに聞いてくる指定を省けて便利。

openssl req \
    -subj '/CN=common_name.example.com/O=ORGANIZATION/C=JP' \
    -x509 -nodes -days 365 -newkey rsa:2048 \
    -keyout /etc/ssl/private/apache-selfsigned.key \
    -out /etc/ssl/certs/apache-selfsigned.crt
6
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
1