Why not login to Qiita and try out its useful features?

We'll deliver articles that match you.

You can read useful information later.

2
2

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.

SSL証明書の内容確認

Last updated at Posted at 2016-08-02

SSL証明書の内容確認はなぜ必要なのか

SSL証明書を発行した時、たいていはメールで届きます。

サーバにアップロードする段階で、ターミナルにペーストしたりしていると、
文字コードやら改行コードやらのイタズラにより、
証明書が読めない状態になっていたりします。

Apacheに設定したら証明書が読み込めなくて、
起動しなかったりすることもあるので、
SSL証明書の読み出し確認は割と重要です。

確認コマンド

以下のコマンドで、証明書、秘密鍵、CSRのファイルが読めるか確認できます。

証明書ファイルの内容を確認

# openssl x509 -text -noout -in /[FilePath]/[CertFile]

秘密鍵ファイルの内容を確認

# openssl rsa -text -noout -in /[FilePath]/[KeyFile]

CSRファイルの内容を確認

# openssl req -text -noout -in /[FilePath]/[CSRFile] 

昔はもっと違うコマンドを使っていた気がするのですが、
今検索するとこのコマンドが出てきて、こっちのほうが使いやすそうです。

2
2
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

Qiita Conference 2025 will be held!: 4/23(wed) - 4/25(Fri)

Qiita Conference is the largest tech conference in Qiita!

Keynote Speaker

ymrl、Masanobu Naruse, Takeshi Kano, Junichi Ito, uhyo, Hiroshi Tokumaru, MinoDriven, Minorun, Hiroyuki Sakuraba, tenntenn, drken, konifar

View event details
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?