/
343.txt
122 lines (89 loc) · 6.22 KB
/
343.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
[1] [DFN[[[subjectAltName]]]] ([DFN[[[SAN]]]]) は、[[証明書]]において[[ドメイン名]]や
[[IPアドレス]]などを記述する欄です。
[12] [[TLS]] + [[PKIX]] による [[service identity]] の検証では、
[[サーバー証明書]]中の本欄に記された[[ドメイン名]]がアクセスしている[[サーバー]]の[[ドメイン名]]と[[一致]]しているかが検証されます。
* 仕様書
[REFS[
- [3] [CITE@en[RFC 5280 - Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile]] ([TIME[2015-02-22 15:44:10 +09:00]] 版) <http://tools.ietf.org/html/rfc5280#section-4.2>
-- [2] '''[CITE@en[RFC 2459 - Internet X.509 Public Key Infrastructure Certificate and CRL Profile]]
([TIME[2014-12-22 14:13:43 +09:00]] 版)
<http://tools.ietf.org/html/rfc2459#section-4.2.1.6>'''
- [13] [CITE[[[BR]]]] ([TIME[2014-11-01 05:54:38 +09:00]] 版) <https://cabforum.org/wp-content/uploads/BRv1.2.3.pdf#page=17>
]REFS]
* 構文
[6] 値は、 [CODE[[[GeneralNames]]]] です [SRC[>>2]]。
[FIG(railroad)[
= [CODE[[[GeneralNames]]]]
]FIG]
* 適合性
[4] [[CA]] は [[SAN]] に対応しなければ[['''なりません''']] [SRC[>>3, >>13]]。
[14] [[BR]] に従う [[CA]] が[[発行]]する[[証明書]]の [[SAN]] は、
最低1つの[[エントリー]]を含まなければ[['''なりません''']]。各[[エントリー]]は
[CODE[[[dNSName]]]] または [CODE[[[iPAddress]]]] でなければ[['''なりません''']]。 [SRC[>>13]]
[5] [[応用]]は [[SAN]] を認識しなければ[['''なりません''']] [SRC[>>3]]。
* [CODE[Subject]] 欄における [CODE[subjectAltName]] の指定
[19] [[CSR]] において ([[SAN]] [[拡張]]ではなく) [CODE[[[subject]]]] 欄において
[DFN[[CODE[subjectAltName]]]] という欄に [CODE[DNS.1=domain1.example, DNS.2=domain2.example]]
のような値を指定する例 [SRC[>>17, >>18]] が示されていることがあります。
[20] [[CSR]] を受け取って[[証明書]]を発行する [[CA]] はこの指定を使ってくれる [SRC[>>18]]
と説明されています。
[21] [[証明書]]の [CODE[[[subject]]]] 欄にこのような指定を含めても、
[[Firefox]] も [[Chrome]] も [[IE]] も認識しないようです。
[[OpenSSL]] によって [[CSR]] から[[証明書]]を発行しても、
[[CSR]] の [CODE[[[subject]]]] がそのまま[[証明書]]に使われるだけで、
[[証明書拡張]]に変換されるわけではないようです。 [TIME[2015-08-13T12:00:59.600Z]]
[REFS[
- [17] [CITE[OpenSSL CSR with Alternative Names one-line | End Point Blog]] ([TIME[2015-08-13 05:37:39 +09:00]] 版) <http://blog.endpoint.com/2014/10/openssl-csr-with-alternative-names-one.html>
- [18] [CITE[SSL Certificate SANs and Multi-level Wildcards | End Point Blog]] ([TIME[2015-08-13 05:37:39 +09:00]] 版) <http://blog.endpoint.com/2013/10/ssl-certificate-sans-and-multi-level.html>
]REFS]
* メモ
[FIG(quote)[
[FIGCAPTION[
[7] [CITE@en[RFC 6125 - Representation and Verification of Domain-Based Application Service Identity within Internet Public Key Infrastructure Using X.509 (PKIX) Certificates in the Context of Transport Layer Security (TLS)]]
([TIME[2015-03-13 22:27:53 +09:00]] 版)
<https://tools.ietf.org/html/rfc6125#section-1.8>
]FIGCAPTION]
> subjectAltName entry: An identifier placed in a subjectAltName
> extension.
> subjectAltName extension: A standard PKIX certificate extension
> '''['''PKIX''']''' enabling identifiers of various types to be bound to the
> certificate subject -- in addition to, or in place of, identifiers
> that may be embedded within or provided as a certificate's subject
> field.
]FIG]
[FIG(quote)[
[FIGCAPTION[
[8] [CITE[ネームベースの VirtualHost で SSL/TLS (5) - TenForwardの日記]]
([TIME[2015-03-20 18:29:13 +09:00]] 版)
<http://d.hatena.ne.jp/defiant/20080123/1201083050>
]FIGCAPTION]
> IPアドレスでアクセスするので,以下のように subjectAltName も "IP" を指定してやってみました.これだと Firefox2 だと問題なく全てのアドレスでアクセス出来ましたが,IE6 と Opera9 だと,証明書内の名前とアクセスしようとしているサーバ名が違う,というような警告が出ます.
]FIG]
[FIG(quote)[
[FIGCAPTION[
[9] [CITE@ja[自堕落な技術者の日記 : 小ネタ:FireFoxとIEでのIPアドレスのSubjectAltName dNSNameの扱いの違い - livedoor Blog(ブログ)]]
([TIME[2015-03-25 01:10:46 +09:00]] 版)
<http://blog.livedoor.jp/k_urushima/archives/1638629.html>
]FIGCAPTION]
> 某IPアドレスで書かれたサイトにHTTPSでアクセスしてみると うむむ、FireFox 3.6.23だと 信頼できない接続のアラートが、、、
> IE8だと問題ありません。
> んなアホな。 うむむと思ってSSLサーバー証明書を見てみると
> SubjectAltNameのGeneralName値が
> dNSName: 192.168.1.5
> みたいにDNS NameのところにIPアドレスが 書いてある証明書のせいみたいなんです。
]FIG]
[10] [CITE@en[369112 – With HTTPS, the Subject Common Name gets ignored if subjectAltName extension is present.]]
([TIME[2015-03-25 01:12:44 +09:00]] 版)
<https://bugzilla.mozilla.org/show_bug.cgi?id=369112>
[11] [CITE@en[553749 – mozilla.org sites should use an SSL certificate with a subjectAltName]]
([TIME[2015-04-02 12:19:01 +09:00]] 版)
<https://bugzilla.mozilla.org/show_bug.cgi?id=553749>
[15] [CITE[gitやcurlやwgetでGitHubにアクセスするとcertification errorになる原因を調べてみた - Dマイナー志向]]
([TIME[2015-03-29 12:43:51 +09:00]] 版)
<http://d.hatena.ne.jp/tmatsuu/20110614/1308010044>
[16] [CITE[certificates - Provide subjectAltName to openssl directly on command line - Information Security Stack Exchange]]
([TIME[2015-08-13 17:33:20 +09:00]] 版)
<http://security.stackexchange.com/questions/74345/provide-subjectaltname-to-openssl-directly-on-command-line>
[22] [CITE@ja[自堕落な技術者の日記 : 最近の証明書の話題(2): CloudFlare DNS 1.1.1.1サイトのIPv6証明書 - livedoor Blog(ブログ)]]
([TIME[2018-05-20 23:18:54 +09:00]])
<http://blog.livedoor.jp/k_urushima/archives/1839342.html>