@@ -70,7 +70,7 @@ Perfect Forward Secrecyを実現するためには、ディフィー・ヘルマ
70
70
To create .pfx or .p12, do this:
71
71
-->
72
72
73
- .pfx もしくは.p12ファイルを生成するには以下のようにします
73
+ .pfx もしくは.p12を生成するには次のようにします:
74
74
75
75
openssl pkcs12 -export -in agent5-cert.pem -inkey agent5-key.pem \
76
76
-certfile ca-cert.pem -out agent5.pfx
@@ -85,6 +85,7 @@ To create .pfx or .p12, do this:
85
85
86
86
<!-- type=misc -->
87
87
88
+ T<!--
88
89
The TLS protocol lets the client renegotiate certain aspects of the TLS session.
89
90
Unfortunately, session renegotiation requires a disproportional amount of
90
91
server-side resources, which makes it a potential vector for denial-of-service
@@ -104,19 +105,50 @@ Don't change the defaults unless you know what you are doing.
104
105
To test your server, connect to it with ` openssl s_client -connect address:port `
105
106
and tap ` R<CR> ` (that's the letter ` R ` followed by a carriage return) a few
106
107
times.
108
+ -->
109
+
110
+ TLS プロトコルでは、クライアントに TLS セッションの再ネゴシエーションを
111
+ 許します。
112
+
113
+ 残念ながら、セッション再ネゴシエーション要求はサーバサイドに過度なリソースを
114
+ 要求するため、それは潜在的なサーバ強制停止攻撃となります。
115
+
116
+ これを軽減するために、再ネゴシエーションは 10 分当たり 3 回までに
117
+ 制限されています。この制限を超えると、[ tls.TLSSocket] [ ]
118
+ のインスタンス上でエラーが生成されます。この制限は変更可能です:
119
+
120
+ - ` tls.CLIENT_RENEG_LIMIT ` : 再ネゴシエーションの上限、デフォルトは 3 です。
121
+
122
+ - ` tls.CLIENT_RENEG_WINDOW ` : 秒単位の再ネゴシエーションウィンドウ、
123
+ デフォルトは 10 分です。
124
+
125
+ あなたが何をしようとしているか十分に理解していない限り、
126
+ デフォルトを変更しないでください。
127
+
128
+ サーバをテストするために、` openssl s_client -connect address:port `
129
+ および ` R<CR> ` (` R ` キーの後に続けてリターンキー) を
130
+ 数回繰り返します。
131
+
107
132
108
133
109
134
## NPN and SNI
110
135
111
136
<!-- type=misc -->
112
137
138
+ <!--
113
139
NPN (Next Protocol Negotiation) and SNI (Server Name Indication) are TLS
114
140
handshake extensions allowing you:
115
141
116
142
* NPN - to use one TLS server for multiple protocols (HTTP, SPDY)
117
143
* SNI - to use one TLS server for multiple hostnames with different SSL
118
144
certificates.
145
+ -->
146
+
147
+ NPN (Next Protocol Negotitation) と SNI (Server Name Indication) は
148
+ TLS の拡張で、以下を可能にします。
119
149
150
+ * NPN - 一つの TLS サーバで複数のプロトコル (HTTP、SPDY) を使用。
151
+ * SNI - 一つの TLS サーバでホスト名の異なる複数の証明書を使用。
120
152
121
153
## Perfect Forward Secrecy
122
154
@@ -145,19 +177,34 @@ is expensive.
145
177
146
178
## tls.getCiphers()
147
179
180
+ <!--
148
181
Returns an array with the names of the supported SSL ciphers.
182
+ -->
183
+
184
+ サポートされている SSL 暗号名の配列を返します。
149
185
186
+ <!--
150
187
Example:
188
+ -->
189
+
190
+ 例:
151
191
152
192
var ciphers = tls.getCiphers();
153
193
console.log(ciphers); // ['AES128-SHA', 'AES256-SHA', ...]
154
194
155
195
156
196
## tls.createServer(options[ , secureConnectionListener] )
157
197
198
+ <!--
158
199
Creates a new [tls.Server][]. The `connectionListener` argument is
159
200
automatically set as a listener for the [secureConnection][] event. The
160
201
`options` object has these possibilities:
202
+ -->
203
+
204
+ 新しい [ tls.Server] [ ] を作成します。
205
+ ` connectionListener ` は [ secureConnection] [ ] イベントのリスナとして
206
+ 自動的に登録されます。
207
+ ` options ` は以下を持つことができます:
161
208
162
209
- ` pfx ` : A string or ` Buffer ` containing the private key, certificate and
163
210
CA certs of the server in PFX or PKCS12 format. (Mutually exclusive with
@@ -253,7 +300,11 @@ automatically set as a listener for the [secureConnection][] event. The
253
300
SSL version 3. The possible values depend on your installation of
254
301
OpenSSL and are defined in the constant [ SSL_METHODS] [ ] .
255
302
303
+ <!--
256
304
Here is a simple example echo server:
305
+ -->
306
+
307
+ これはシンプルはエコーサーバの例です:
257
308
258
309
var tls = require('tls');
259
310
var fs = require('fs');
@@ -280,7 +331,11 @@ Here is a simple example echo server:
280
331
console.log('server bound');
281
332
});
282
333
334
+ <!--
283
335
Or
336
+ -->
337
+
338
+ あるいは:
284
339
285
340
var tls = require('tls');
286
341
var fs = require('fs');
303
358
server.listen(8000, function() {
304
359
console.log('server bound');
305
360
});
361
+
362
+ <!--
306
363
You can test this server by connecting to it with `openssl s_client`:
364
+ -->
365
+
366
+ ` openssl s_client ` を使用してこのサーバに接続するテストを行うことができます。
307
367
308
368
309
369
openssl s_client -connect 127.0.0.1:8000
@@ -312,10 +372,18 @@ You can test this server by connecting to it with `openssl s_client`:
312
372
## tls.connect(options[ , callback] )
313
373
## tls.connect(port[ , host] [ , options ] [ , callback] )
314
374
375
+ <!--
315
376
Creates a new client connection to the given `port` and `host` (old API) or
316
377
`options.port` and `options.host`. (If `host` is omitted, it defaults to
317
378
`localhost`.) `options` should be an object which specifies:
379
+ -->
380
+
381
+ 与えられた ` port ` と ` host ` (旧 API) または ` options.port ` と ` options.host `
382
+ で新しいクライアントコネクションを作成します
383
+ (` host ` が省略された場合、デフォルトは ` localhost ` です)。
384
+ ` options ` は以下を指定したオブジェクトです:
318
385
386
+ <!--
319
387
- `host`: Host the client should connect to
320
388
321
389
- `port`: Port the client should connect to
@@ -359,8 +427,54 @@ Creates a new client connection to the given `port` and `host` (old API) or
359
427
- `secureProtocol`: The SSL method to use, e.g. `SSLv3_method` to force
360
428
SSL version 3. The possible values depend on your installation of
361
429
OpenSSL and are defined in the constant [SSL_METHODS][].
430
+ -->
431
+
432
+ - ` host ` : クライアントが接続するホスト。
433
+
434
+ - ` port ` : クライアントが接続するポート番号。
435
+
436
+ - ` socket ` : 新しいソケットを生成するのではなく、与えられたソケット上で
437
+ セキュアな接続を確立します。
438
+ このオプションが指定された場合、` host ` および ` port ` は無視されます。
439
+
440
+ - ` path ` : 指定された ` path ` とのunixソケットを作成します。
441
+ このオプションが指定された場合、` host ` および ` port ` は無視されます。
442
+
443
+ - ` pfx ` : PFX または PKCS12 でエンコードされた秘密鍵、証明書、
444
+ およびサーバに対する CA の証明書を含む文字列またはバッファ。
445
+
446
+ - ` key ` : PEM フォーマットによるサーバの秘密鍵を持つ文字列または
447
+ ` Buffer ` です。 (配列を渡すこともできます)
448
+
449
+ - ` passphrase ` : 秘密鍵または pfx のパスフレーズを表す文字列です。
450
+
451
+ - ` cert ` : PEM フォーマットによる証明書の鍵を持つ文字列または ` Buffer ` です。(配列を渡すこともできます)
452
+
453
+ - ` ca ` : PEMフォーマットによる信頼できる証明書の文字列または
454
+ ` Buffer ` の配列です。
455
+ 省略された場合、ベリサインなどのよく知られた「ルート」認証局が使われます。
456
+ これらはコネクションの認証に使われます。
457
+
458
+ - ` ciphers ` : A string describing the ciphers to use or exclude, separated by
459
+ ` : ` . Uses the same default cipher suite as ` tls.createServer ` .
460
+
461
+ - ` rejectUnauthorized ` : ` true ` の場合、サーバ証明書は提供された認証局の
462
+ リストによって検証されます。
463
+ 認証されなかった場合は ` 'error' ` イベントが生成されます。
464
+ 認証は HTTP リクエストが送信される * 前* にコネクションレベルで行われます。
465
+ ` err.code ` はOpenSSLのエラーコードを含みます。 デフォルトは true です。
466
+
467
+ - ` NPNProtocols ` : サポートする NPN プロトコルの文字列または ` Buffer `
468
+ の配列です。
469
+ ` Buffer ` は次のような形式です: ` 0x05hello0x5world `
470
+ 最初のバイトは次のプロトコル名の長さです
471
+ (通常、配列を渡す方がシンプルです: ` ['hello', 'world'] ` )。
472
+
473
+ - ` servername ` : TLS 拡張である SNI (Server Name Indication) のサーバ名です。
362
474
363
- - ` session ` : A ` Buffer ` instance, containing TLS session.
475
+ - ` secureProtocol ` : 使用する SSL 方式、たとえば ` SSLv3_method ` は
476
+ SSL バージョン 3 を強制します。可能な値はインストールされている OpenSSL
477
+ と、その定数 [ SSL_METHODS] [ ] の定義に依存します。
364
478
365
479
The ` callback ` parameter will be added as a listener for the
366
480
[ 'secureConnect'] [ ] event.
0 commit comments