certificate extension

証明書 (PKI)

[51] 証明書 (certificate) は、公開鍵実体を関連付けたものです。

[46] PKI も参照。
[99] 一般名詞のようにも聞こえますが、この分野では専門用語 (ほぼ固有名詞) です。

仕様書

[31] 証明書一般については X.509 で規定されていますが、 インターネットでは X.509 証明書の v3 形式のプロファイルとして RFC 5280 で規定されるものが利用されています。

証明書の版

[25] CCITT X.509 の1988年版に最初の証明書の形式が規定されており、 これは v1 と呼ばれています >>24

[28] PEM (1993) は v1 を採用しています。この運用経験が v3 の開発にフィードバックされています。 >>24

[26] X.509 は1993年に改訂され、この証明書の形式が v2 と呼ばれています >>24

[27] X.509 は更に1996年に改訂され、この証明書の形式が v3 と呼ばれています >>24

[29] RFC 3280 は v3 のインターネット向けプロファイルです。 RFC 5280 はその改訂版です。

[34] RFC 5280 においては、証明書の版は 3 ですが、場合によっては 2 とできることもあります。その場合でも 3 としても構いません。実装はどの版も受け入れるべきですが、 少なくても 3 に対応しなければなりません。 >>30

[97] TLS/1.2証明書は v3 とされています。

それ以外が使われた時どうなるのかは不明です。

[72] BR に従うルートCA証明書下位CA証明書は、 v3 を使わなければなりません >>71

Subscriber Certificate は版の指定がありません。

[102] FirefoxChromeIE も v1 にも対応しているようです。

[37] TBSCertificateversion に指定します。

[88] application/pkix-certapplication/pkix-crl には version 引数があります >>86。既定値は 1 >>86 とありますが、意味は規定されていません。

[85] application/pkix-pkipath (2011年) >>84 にも version 引数があります。こちらも既定値は 1 >>84 とありますが、意味は規定されていません。

[89] >>88version 引数は意味不明であるとして著者自身の正誤表 (2009年) >>87 により削除されています。 >>85version 引数正誤表でも訂正されていません。

[90] 意味もわからずコピペして、コピペ元も正誤表だけで本文が改訂されていないものだから見落としたのでしょうね...

構文

[32] 証明書の形式は ASN.1 により定義されています >>30

[77] DER を使って表現するのが一般的ですが、理論上は ASN.1 に対応した他の構文でも表現できます。

[33] 署名の計算には ASN.1 DER を使います >>30

[35] 証明書は、次の (field) で構成されます >>30

Certificate
tbsCertificate
署名されるデータ。 TBSCertificate 型の値。
signatureAlgorithm
signatureValue

[36] TBSCertificate 値は次ので構成されます >>30

TBSCertificate
version
証明書の版。
serialNumber
signature
issuer
証明書の発行者。
validity
証明書の有効期間。
subject
証明書公開鍵に関連付けられた実体
subjectPublicKeyInfo
issuerUniqueID
subjectUniqueID
extensions
証明書拡張

証明書拡張

[39] extension は、1つ以上証明書拡張です。 これは v3 でのみ使えます。 >>30

[40] 拡張には、 critical なものと non-critical なものがあります。 critical なものは、認識できないか処理できないデータが含まれているなら、 証明書を拒絶しなければなりませんnon-critical なものは、認識できなければ無視して構いませんが、認識できるなら処理しなければなりません>>30

[42] 証明書に同じ種類の拡張を複数含めてはなりません >>30

[41] 拡張のいくつかは、対応が必須となっています。

[129] 証明書拡張

[103] 証明書拡張のいくつかは、 CSR で使われることもあります。

[130] TLS拡張とは無関係なので注意。

メタデータ

[74] ルートCA証明書を保持する実装は、証明書ごとにメタデータを関連付けて保持していることがあります。

[136] 証明書ハッシュ値が使われることがあります。 証明書指紋

ファイル形式

[78] 証明書の表現形式には、次のものがあります。

[81] DER 形式は最も基本的な証明書の表現形式と思われます。 Windows では「DER encoded binary X.509」と呼ばれています。 DER 形式の証明書は、拡張子 .cer >>86.crt が用いられることがあります。 MIME型application/pkix-cert です >>86

[91] このMIME型には version 引数 (>>88) があります。

[79] .pem 形式の証明書は、 Windows では「Base 64 encoded X.509」と呼ばれています。 .pem 形式の証明書は、拡張子 .cer が用いられることがあります。

.pem を参照。

[94] 証明書ダウンロードでは、 MIME型として application/x-x509-user-certapplication/x-x509-ca-certapplication/x-x509-email-cert が使われます。

[138] RFC 4325: Internet X.509 Public Key Infrastructure Authority Information Access Certificate Revocation List (CRL) Extension, https://www.rfc-editor.org/rfc/rfc4325.html#section-2

文脈

[38] 証明書は、次のプロトコルファイルで使われます。

[133] x5t - 証明書SHA-1base64url

証明書に関する概念

[48] 次の証明書の分類があります。

[47] 次の構文やデータ構造があります。

[50] その他次の概念があります。

SSL 証明書

[57] SSL/TLS で使われることを主に想定した証明書SSL証明書 / TLS証明書といいます。

[58] 明確な定義はなさそうですが、 PKIX に従った証明書であって、 TLSサーバーTLSクライアントで用いられるものを指しているようです。

[63] RFC 5280extended key usage 拡張に記述する値として id-kp-serverAuth (1.3.6.1.5.5.7.3.1) と id-kp-clientAuth (1.3.6.1.5.5.7.3.2) を定義しており、 それぞれ「TLS WWW server authentication」と「TLS WWW client authentication」 >>62 と説明されています。 BR に従う Subscriber Certificate はこの一方または両方が指定されることが要求されています >>64

[65] しかしながら、これらの値の意味は「TLS WWW」という曖昧な説明以外に明確に規定されていません。 また TLSHTTPS の仕様の側でこれらの値が出現しない証明書の利用を禁止しているわけでもなさそうです。

[69] netscape-cert-type 拡張には値として SSL-client (SSL client authentication use) や SSL-server (SSL server authentication use) を指定できます。 (他に CA 用の SSL-CA という値もあります。) 当初はこれらの値を持つものが SSL証明書と呼ばれていたと思われます。現在でもこれらの値を指定した証明書はあります。

[59] サーバー証明書については、 CNSANドメイン名等が記述され、 service identity を検証できる状態にあるものを指すのが普通です。 多くの場合は HTTPS で利用され、 CA/Browser Forum の規定に基づく CA発行した証明書である必要があります。 (HTTPS で用いない証明書や限られた範囲でのみ用いられる証明書の場合はこの限りではありません。)

[60] クライアント証明書については、特別な制約はなさそうです。クライアント証明書は組織内など限られた範囲でのみ用いられます。

団体

[52] 証明書PKI を構成する技術の1つであり、 ITU-T (および ISO/IEC) で標準化されています。 インターネットでの利用、特に TLS との組み合わせに関しては IETFPKIX として規定しています。

PKIPKIX を参照。

[54] Web で利用可能な証明書 (主として HTTPS で用いられるもの) については CA/Browser Forum が発行基準を定めています。また各Webブラウザー事業者OS の提供元がそれぞれの利用するルート証明書についての基準を設けています。

[55] 実際の証明書の発行はこれらの仕様に基づき各種機関・企業が行っています。

CA 参照。

歴史

[76] PKCS #6 は v1 の拡張でした。

実装

[107] nginxreload しないと証明書ファイルが変更されても再読み込みしません。

[108] おそらく他の実装もそうなっていることが多いでしょう。

[119] Let's Encrypt のように有効期間の短めの証明書を自動更新しながら使い続けるモデルが普及していきそうなので、 TLS の実装もそれに対応できる機能が求められています。

メモ

[1] 無償で正統的なコードサイニング証明書を入手する方法 http://sqs.cmr.sfc.keio.ac.jp/tdiary/?date=20051003#p01 (名無しさん 2005-10-04 00:42:50 +00:00)

[2] 高木浩光@自宅の日記 - PKIよくある勘違い(2)「安全に配布すればルート証明書を入れさせてよい」, PKIよくある勘違い(3)「プライベート認証局が妥当なら.. http://www.takagi-hiromitsu.jp/diary/20050205.html (名無しさん)

[3] 『無償で正統的なコードサイニング証明書を入手する方法:その2』 http://sqs.cmr.sfc.keio.ac.jp/tdiary/?date=20051003#p02 (名無しさん 2006-02-19 07:06:33 +00:00)

[4] 高木浩光@自宅の日記 - IE 7の普及でサーバ証明書失効によるトラブルが表面化する (高木浩光 著, 版) http://takagi-hiromitsu.jp/diary/20070415.html#p01 (名無しさん 2007-04-17 00:54:40 +00:00)

[5] Intent to Deprecate: SHA-1 certificates - Google グループ ( ( 版)) https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/2-R4XziFc7A%5B1-25-false%5D

[6] RFC 3709 - Internet X.509 Public Key Infrastructure: Logotypes in X.509 Certificates ( ( 版)) https://tools.ietf.org/html/rfc3709

[7] RFC 6170 - Internet X.509 Public Key Infrastructure -- Certificate Image ( ( 版)) https://tools.ietf.org/html/rfc6170

[8] Security Issue ( 版) http://web.archive.org/web/19970521032145/http://form.netscape.com/newsref/std/ssl_2.0_certificate.html

[9] Netscape Certificate Specifications ( 版) http://web.archive.org/web/19990218203921/http://home.netscape.com/eng/security/certs.html

[10] Netscape Certificate Download Specification ( 版) http://web.archive.org/web/19990202032056/http://www.home.netscape.com/eng/security/downloadcert.html

[11] Netscape Certificate Download Specification ( 版) http://web.archive.org/web/19990129050825/http://www.home.netscape.com/eng/security/comm4-cert-download.html

[12] Netscape Certificate Extensions Specification ( 版) http://web.archive.org/web/19990129063212/http://www.home.netscape.com/eng/security/comm4-cert-exts.html

[13] Netscape Certificate Extensions Specification ( 版) http://web.archive.org/web/19990218190724/http://home.netscape.com/eng/security/cert-exts.html

[14] Netscape Certificate Download Specification ( 版) http://web.archive.org/web/19990202032056/http://www.home.netscape.com/eng/security/downloadcert.html

[15] Security Issue ( 版) http://web.archive.org/web/19991008215709/http://home.netscape.com/eng/security/ssl_2.0_certificate.html

[16] RFC 6091 - Using OpenPGP Keys for Transport Layer Security (TLS) Authentication ( 版) http://tools.ietf.org/html/rfc6091

[17] Transport Layer Security (TLS) Extensions ( 版) http://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#tls-extensiontype-values-3

[18] Transport Layer Security (TLS) Extensions ( 版) http://www.iana.org/assignments/tls-extensiontype-values/tls-extensiontype-values.xhtml#certificate-status

[19] ImperialViolet - Revocation checking and Chrome's CRL (Adam Langley 著, 版) https://www.imperialviolet.org/2012/02/05/crlsets.html

[20] CA:Certificate Download Specification - MozillaWiki ( ( 版)) https://wiki.mozilla.org/CA:Certificate_Download_Specification

[22] Necko/Differences - MozillaWiki ( 版) https://wiki.mozilla.org/Necko/Differences

Other browsers have more robust certificate chain processing; ours gets confused in some common situations.

[44] Google warns of unauthorized TLS certificates trusted by almost all OSes [Updated] | Ars Technica ( 版) http://arstechnica.com/security/2015/03/google-warns-of-unauthorized-tls-certificates-trusted-by-almost-all-oses/

[45] CA:Problematic Practices - MozillaWiki ( 版) https://wiki.mozilla.org/CA:Problematic_Practices

[53] ( 版) https://cabforum.org/wp-content/uploads/BRv1.2.3.pdf#page=9

Certificate: An electronic document that uses a digital signature to bind a public key and an identity

[56] ( 版) https://cabforum.org/wp-content/uploads/BRv1.2.3.pdf#page=12

Valid Certificate: A Certificate that passes the validation procedure specified in RFC 5280.

[66] Netscape Certificate Download Specification ( 版) http://web.archive.org/web/19970709163955/http://home.netscape.com/eng/security/downloadcert.html

[67] Netscape Certificate Extensions Specification ( 版) http://web.archive.org/web/19970727173508/http://home.netscape.com/eng/security/cert-exts.html

[68] Constants for Netscape Extensions (Windows) ( 版) https://msdn.microsoft.com/en-us/library/windows/desktop/aa378149(v=vs.85).aspx

[70] X.509電子証明書の互換性 ( 版) https://www.ipa.go.jp/security/fy10/contents/over-all/02/25.html

Netscape Communicator では更に独自拡張として netscape-cert-type, netscape-comment が利用されている。これらの拡張型は 1997年8月に Netscape 社の Jeff Weinstein がドラフトとして公開された。このドラフトでは上の2つのほか netscape-base-url, netscape-revocation-url, netscape-ca-revocation-url, netscape-cert-renewal-url, netscape-ca-policy-url, netscape-ssl-server-name が定義されているが、これらは廃止 (obsolete) されている。

[73] CA:MD5and1024 - MozillaWiki ( 版) https://wiki.mozilla.org/CA:MD5and1024

[75] Google Online Security Blog: Maintaining digital certificate security ( 版) http://googleonlinesecurity.blogspot.jp/2015/03/maintaining-digital-certificate-security.html

To assist customers affected by this decision, for a limited time we will allow CNNIC’s existing certificates to continue to be marked as trusted in Chrome, through the use of a publicly disclosed whitelist.

[80] 技術/Security/PKI,SSL,TLS/メモ01_拡張子の迷宮(pem,der,crt,cer,csr,...) - Glamenv-Septzen.net ( 版) http://www.glamenv-septzen.net/view/1058

[82] CA:Certificate Download Specification - MozillaWiki ( 版) https://wiki.mozilla.org/CA:Certificate_Download_Specification

Mozilla products can accept certificates in several formats. In all cases the certificates are X509 version 1, 2, or 3.

[83] Issue 66342 - android - <keygen> html5 element creates but does not save certificate - Android Open Source Project - Issue Tracker - Google Project Hosting ( 版) https://code.google.com/p/android/issues/detail?id=66342

[93] Netscape Certificate Extensions Specification ( 版) http://web.archive.org/web/19990129063212/http://www.home.netscape.com/eng/security/comm4-cert-exts.html

[92] Exciting Updates to Certificate Verification in Gecko | Mozilla Security Blog ( 版) https://blog.mozilla.org/security/2014/04/24/exciting-updates-to-certificate-verification-in-gecko/

[95] X.690 : Information technology - ASN.1 encoding rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER) (tsbmail 著, 版) http://www.itu.int/rec/T-REC-X.690-200811-I/en

[96] X.690 : Information technology - ASN.1 encoding rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER) (tsbmail 著, 版) http://www.itu.int/rec/T-REC-X.690-200811-I/en

[21] Oops: Instagram forgot to renew its SSL certificate (Owen Williams 著, 版) http://thenextweb.com/apps/2015/04/30/oops-instagram-forgot-to-renew-its-ssl-certificate/

[98] Fraudulent *.google.com Certificate | Mozilla Security Blog ( 版) https://blog.mozilla.org/security/2011/08/29/fraudulent-google-com-certificate/

[100] RFC 5697 - Other Certificates Extension ( 版) https://tools.ietf.org/html/rfc5697

[101] RFC 3739 - Internet X.509 Public Key Infrastructure: Qualified Certificates Profile ( 版) https://tools.ietf.org/html/rfc3739

[104] Web Security Context: User Interface Guidelines ( 版) http://www.w3.org/TR/wsc-ui/#tlstosecurehttp

[105] RFC 7633 - X.509v3 Transport Layer Security (TLS) Feature Extension ( 版) https://tools.ietf.org/html/rfc7633

[106] Why ninety-day lifetimes for certificates? ( 版) https://letsencrypt.org/2015/11/09/why-90-days.html

According to Firefox Telemetry, 29% of TLS transactions use ninety-day certificates. That’s more than any other lifetime.

[49] OpenSSL ( (OpenSSL Foundation, Inc.著, )) https://www.openssl.org/docs/manmaster/apps/x509v3_config.html#TLS-Feature-aka-Must-Staple

[109] gecko-dev/security/manager/ssl/tests/unit at master · mozilla/gecko-dev ( ()) https://github.com/mozilla/gecko-dev/tree/master/security/manager/ssl/tests/unit

[110] cURL - SSL CA Certificates ( ()) https://curl.haxx.se/docs/sslcerts.html

[111] cURL - How To Use ( ()) https://curl.haxx.se/docs/manpage.html#-k

-k, --insecure

(SSL) This option explicitly allows curl to perform "insecure" SSL connections and transfers. All SSL connections are attempted to be made secure by using the CA certificate bundle installed by default. This makes all connections considered "insecure" fail unless -k, --insecure is used.

[112] 【悲報】Google、シマンテック発行のSSL証明書を問答無用でブロックへ : IT速報 ( ()) http://blog.livedoor.jp/itsoku/archives/50935193.html

[113] sleevi/explainer: Technical 'explainer' related to https://groups.google.com/a/chromium.org/d/msg/blink-dev/eUAKwjihhBs/rpxMXjZHCQAJ ( ()) https://github.com/sleevi/explainer

[114] Symantec Certificates ( ()) https://chromium.googlesource.com/chromium/src/+/master/net/data/ssl/symantec/README.md

[115] net/data/ssl - chromium/src - Git at Google ( ()) https://chromium.googlesource.com/chromium/src/+/master/net/data/ssl

[116] [Managed PKI for SSL] Google Chrome57 のバグにより EV SSL 証明書の組織名がグリーン表示されない事象について | Symantec () https://knowledge.symantec.com/jp/support/ssl-certificates-support/index?vproductcat=V_C_S&vdomain=VERISIGN.JP&page=content&id=INFO4287&actp=RSS&viewlocale=ja_JP&locale=ja_JP&redirected=true

[117] 705285 - EV evaluation breaks if "2.23.140.1.1" is present and the root is not enabled for it - chromium - Monorail () https://bugs.chromium.org/p/chromium/issues/detail?id=705285

[118] RFC 8040 - RESTCONF Protocol () https://tools.ietf.org/html/rfc8040#section-2.2

RESTCONF servers MUST present an X.509v3-based certificate when

establishing a TLS connection with a RESTCONF client. The use of

X.509v3-based certificates is consistent with NETCONF over TLS

[RFC7589].

[120] crt.sh | Certificate Search () https://crt.sh/

[121] crt.sh () https://github.com/crtsh

[122] crt.sh | Certificate Search () https://crt.sh/

[123] crt.sh () https://github.com/crtsh

[124] 〔三菱UFJダイレクト〕銀行名変更にともなうサーバ証明書の切替について | 三菱UFJ銀行 () http://direct.bk.mufg.jp/info_news/20180522_server/index.html

2018年6月10日(日)に新銀行名のサーバ証明書への切替を予定しております。

[125] Is the Certificate Authority name-constrained somehow? · Issue #11075 · web-platform-tests/wpt () https://github.com/web-platform-tests/wpt/issues/11075

[126] Ruby の openssl ライブラリを使って、サーバ証明書やクライアント証明書を作成する () https://qiita.com/k-masaki/items/12b5e8a1874214308912

[127] OpenSSLでオレオレ認証局を作ろう - 気ままなブログ () http://d.hatena.ne.jp/entree/20150308/1425828062

[128] FGasper/p5-Crypt-Perl: CPAN’s Crypt::Perl () https://github.com/FGasper/p5-Crypt-Perl

[131] x509v3.cnf(5) - OpenBSD manual pages () https://man.openbsd.org/x509v3.cnf.5

[132] kroeckx/x509lint: Tool to check X509 certificates () https://github.com/kroeckx/x509lint

[134] Extend WebSocket interface to access and use certificates · Issue #4420 · whatwg/html () https://github.com/whatwg/html/issues/4420

[135] Let's Encrypt、証明書およそ300万件の強制失効処理を取りやめ | スラド セキュリティ () https://security.srad.jp/story/20/03/07/2211251/

[137] SSL/TLS証明書、9月1日以降の発行分は有効期間が実質1年間に。主要ブラウザの仕様変更で | スラド アップル () https://apple.srad.jp/story/20/08/21/0335207/