証明書の署名アルゴリズムを確認

表題の通り。`openssl`コマンドでやる。

■ 環境

  • OpenSSL
  • Mac OSX El Capitan

■ openssl

証明書のファイルが手元にあれば下記コマンドで確認することができる。

$ openssl x509 -text -noout -in [証明書ファイル] | grep Algorithm
        Signature Algorithm: sha256WithRSAEncryption
            Public Key Algorithm: rsaEncryption
    Signature Algorithm: sha256WithRSAEncryption
$

この結果であれば”SHA-2“で署名されているようである。ちなみに最近、対応しないと警告が表示されるらしいと話題になった”SHA-1“の署名アルゴリズムの場合は下記のようになるようであった。

$ openssl x509 -text -noout -in old.cert | grep Algorithm
    Signature Algorithm: sha1WithRSAEncryption
            Public Key Algorithm: rsaEncryption
    Signature Algorithm: sha1WithRSAEncryption
$

以上。