application/x-x509-user-cert

証明書ダウンロード (PKI)

[1] Certificate Download Specification は、証明書ダウンロードに関する仕様書です。

仕様書

ファイル形式

[13] 次のファイル形式が規定されています。

[14] また DER 符号化された証明書も採用しています。

MIME 型

[9] 次の MIME型が規定されています。

[10] >>3 の時点では application/x-x509-email-cert はまだ無かったようです。 >>18>>4 には含まれており、 Netscape4 時代に追加されたものと思われます。
[11] application/x-x509-server-cert も使われることがあるようですが、当仕様書には含まれていません。
[33] 少なくても Chrome は、その他に application/x-pkcs12 にも対応しているように見えます。 (Chromeapplication/x-x509-email-cert に対応していないように見えます。)

[15] これらの MIME型はファイル形式を示すものではなく (>>13 のいずれでも良いようです)、 ダウンロードした証明書をどう処理するべきかを指定するもののようです。

[16] 用途によって少しずつ証明書に記述するべき内容も違っているので、 広義のファイル形式ではあるのですが...

[23] application/x-x509-user-cert は、 Webブラウザー利用者証明書を表しています。 最初の証明書利用者証明書でなければなりません。 >>2

[12] keygen 要素を含むフォームの提出公開鍵を受け取ったサーバー証明書を生成し、 Webブラウザーダウンロードさせるために使うことができます。

[25] application/x-x509-ca-cert は、 CA証明書を表しています。 最初の証明書CA証明書でなければなりません。 >>2

[27] application/x-x509-email-cert は、 他の利用者S/MIME証明書を表しています。 最初の証明書利用者証明書でなければなりません。 >>2

[29] 人や CAWebサイト証明書を用意して、 その人宛に電子メールを送りたい人がこれをダウンロードして使うことが想定されています >>2

処理

[20] 与えられたファイル証明書が複数含まれる場合、 最初の証明書が文脈依存の方法で処理されます >>2

[21] ここでいう文脈依存の方法は、ダウンロードの際の MIME型により決まります。 NSS を使ったサーバーでは、管理画面オプションの選択肢により決まります。 >>2

[24] application/x-x509-user-cert
証明書に対応する秘密鍵利用者ローカル鍵データベースに存在しなければ、 エラーを表示して停止します >>2。そうでなければ、利用者証明書としてローカル証明書データベースに追加します。
[26] application/x-x509-ca-cert
CA を信頼するかどうかを決めるダイアログを表示します >>2
[28] application/x-x509-email-cert
他の利用者証明書としてローカル証明書データベースに追加します。

[22] 最初以外の証明書は、 BasicConstraints により CA証明書であるとされており、既にローカル証明書データベースに含まれていないなら、 信頼されていない CA としてローカル証明書データベースに追加されます。 >>2

[34] Chromeapplication/x-x509-user-cert には対応していますが、 application/x-x509-ca-cert には対応していないようです。

[40] Chromeapplication/x-x509-ca-cert.pemファイルを開くと、危険なファイルの警告が表示されます。

[35] Firefoxapplication/x-x509-ca-cert だと trust bits を選択するダイアログが表示されます。

歴史

[6] >>3 は1996年6月28日付けの Netscape3 版、 >>18Netscape4 版です。

[7] >>4NES>>5>>2Firefox へと受け継がれた版です。

[8] >>2 が2014年5月7日更新で、現時点で最新となっています。

[17] 249004 – Importing false CA certificate leading to error -8182 (perm DoS), especially exploitable by email ( 版) https://bugzilla.mozilla.org/show_bug.cgi?id=249004

[19] ( 版) http://web.archive.org/web/20060929031003/http://www.alw.nih.gov/pki/docs/ns-ca.txt

The browser uses the public key encoded in the certificate to

associate the certificate with the appropriate private key in

its local key database. Now, the certificate is "installed".

[31] Issue 37142 - chromium - Intermediate certs received along with generated client cert will not be saved - An open-source project to help move the web forward. - Google Project Hosting ( 版) https://code.google.com/p/chromium/issues/detail?id=37142

[30] Issue 136534 - chromium - Offer the ability to download application/x-x509-user-cert responses - An open-source project to help move the web forward. - Google Project Hosting ( 版) https://code.google.com/p/chromium/issues/detail?id=136534

[32] draft-gutmann-scep-00 - Simple Certificate Enrolment Protocol ( 版) https://tools.ietf.org/html/draft-gutmann-scep-00#section-5.2.1.1.1

The response will have a Content-Type of "application/x-x509-ca-cert".

[36] Issue 37142 - chromium - Intermediate certs received along with generated client cert will not be saved - An open-source project to help move the web forward. - Google Project Hosting ( 版) https://code.google.com/p/chromium/issues/detail?id=37142

[37] (Pre-)Intent to Deprecate: <keygen> element and application/x-x509-*-cert MIME handling - Google グループ ( 版) https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/pX5NbX0Xack/discussion

On the application/x-x509-*-cert support, there is a wide gap of interoperability. Chrome does not support multiple certificates, but Firefox does. Firefox will further reorder certificates that are inconsistent with what was specified, offering a non-standard behaviour. Chrome does not support application/x-x509-ca-cert on Desktop, and on Android, defers to the platform capabilities, which further diverge from Firefox. Both browsers have the underspecified behaviour of requiring the user having a matching key a-priori, except that's not detailed as to how it works. Firefox also handles various mis-encodings (improper DER, DER when it should be base64), which Chrome later implemented, but is not well specified.

[38] 1024871 – stop offering to import CA certificates when browsed to ( 版) https://bugzilla.mozilla.org/show_bug.cgi?id=1024871

[39] Expand on the <keygen> removal and deprecation (domenic著, ) https://github.com/whatwg/html/commit/8a85d1742d9ac9be17f79f8087898147209d354c