37
39

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

opensslでコマンド一発で自己証明書を作る

Last updated at Posted at 2013-08-13

opensslでコマンド一発で秘密鍵と自己証明書を作成する例です。

openssl req -new -newkey rsa:2048 -sha1 -x509 -nodes \
    -set_serial 1 \
    -days 365 \
    -subj "/C=JP/ST=Osaka/L=Osaka City/CN=example.com" \
    -out /etc/pki/tls/certs/example.com.crt \
    -keyout /etc/pki/tls/private/example.com.key

Ansibleのplaybookの例
https://github.com/hnakamur/ansible-playbooks/blob/c4f05a64cddd4275a437c68ae2439e429d56a9d6/roles/common/tasks/self_signed_certificate.yml

chefのrecipeの例
https://github.com/hnakamur/chef-cookbooks/blob/e27426d394ea63732d56ac617d88d4815d660d7b/self_signed_certificate/recipes/default.rb

37
39
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
37
39

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?