Contents
- UNIX
- Windows
- サーバ
- プログラミング言語
- データベース
- プロトコル
- サービス
- オープンソース
- 規格・技術
- アプリケーション
- PC
- DEVICE
- その他(未分類)
お問合せ:
メールフォーム
| コマンド | 説明 |
|---|---|
| openssl | インターネットで標準的に利用される暗号通信プロトコルである SSL および TLS を実装し、暗号化関連の機能を幅広く提供するコマンド |
% sudo openssl x509 -text -noout -in <CRTファイル> -noout -dates | less
Certificate:
Data:
Version: 3 (0x2)
Serial Number:
xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
Signature Algorithm: sha256WithRSAEncryption
Issuer: C=US, O=GeoTrust Inc., CN=GeoTrust SSL CA - G3
Validity
Not Before: Nov 18 00:00:00 2016 GMT
Not After : Nov 18 23:59:59 2017 GMT
Subject: C=JP, ST=Tokyo, L=SHINJUKU-KU, O=Hoge.Inc, CN=www.example.com
:
(snip)
:
X509v3 extensions:
X509v3 Subject Alternative Name:
DNS:www1.example.com, DNS:www2.example.com, DNS:www3.example.com, DNS:www4.example.com
:
(snip)
:
% sudo openssl x509 -issuer_hash -noout -in <CRTファイル> abcdef01 % sudo openssl x509 -subject_hash -noout -in <CAファイル> abcdef01
→ 同じハッシュ値になれば OK
% sudo openssl x509 -noout -modulus -in <CRTファイル> | openssl md5 (stdin)= abcdef0123456789abcdef0123456789 % sudo openssl rsa -noout -modulus -in <KEYファイル> | openssl md5 (stdin)= abcdef0123456789abcdef0123456789
→ 同じハッシュ値になれば OK
% sudo openssl req -noout -modulus -in <CSRファイル> | openssl md5 (stdin)= abcdef0123456789abcdef0123456789
→ 同じハッシュ値になれば OK
% sudo openssl req -noout -text -in <CSRファイル>
Certificate Request:
Data:
Version: 0 (0x0)
Subject: C=JP, ST=Tokyo, L=Shinjuku, O=hogehoge.Inc, CN=www.example.com
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (2048 bit)
Modulus:
:
(snip)
: