1
3

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.

電子証明書ファイル(p12)の内容確認

Posted at

やりたかったこと

会社でリリースしているアプリに組み込んだ電子証明書の有効期限が確認したい
(windows7)

やったこと

1.openSSL for windowsの入手

下記リンクより、openSSL for windowsを入手
https://slproweb.com/products/Win32OpenSSL.html

image.png
(デフォルトでセットされる内容のまま次へ次へ進む)

2.openssl.exeにパスを設定

「システムのプロパティ」-「環境変数」の[path]にopensslの格納場所を設定。

image.png

image.png

3.openssl.exeの動作確認 on コマンドプロンプト

コマンドプロンプトで「openssl version」と入力

image.png

バージョン情報が確認できたため、無事opensslの導入は完了。

※何度か「序数●●●がダイナミックライブラリ●●●.dllから見つからなかったため~」というポップアップが表示されてコマンドが受け付けられないことがありましたが、都度そのdllファイルをwebから取得してやれば解決しました。

4.証明書ファイルの内容を確認(x509コマンド)

下記コマンドを入力して、証明書ファイルの有効期限を確認

openssl x509 -in output.pem -startdate -enddate -noout

image.png

※もともと持っていたのが#pkcs12形式だったので、事前にp12→pemに変換しています。

openssl pkcs12 -in input.p12 -out output.pem
1
3
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
1
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?