* 仕様書

[REFS[
- [1] '''[CITE@en[RFC 5246 - The Transport Layer Security (TLS) Protocol Version 1.2]] ([TIME[2015-02-19 08:58:15 +09:00]] 版) <http://tools.ietf.org/html/rfc5246#section-7>'''
- [5] [CITE@en[RFC 5246 - The Transport Layer Security (TLS) Protocol Version 1.2]] ([TIME[2015-02-19 08:58:15 +09:00]] 版) <http://tools.ietf.org/html/rfc5246#section-7.4.1.2>
]REFS]

* 構成

[2] [[セッション]]は、次のもので構成されます [SRC[>>1]]。

[FIG(list members)[
:[[セッション識別子]]:[[活性]]または[[再開可能]]な[[セッション状態]]を識別する任意の[[バイト列]]で、
[[鯖]]が選んだもの。
:[[peer証明書]]: [[peer]] の [[X509v3証明書]]。あるいは [[null]]。
:[[圧縮方式]]:[[暗号化]]の前の[[圧縮]]で使う[[アルゴリズム]]。
:[[cipher spec]]:[[PRF]]、[[bulk data encryption algorithm]]、
[[MACアルゴリズム]]を指定するもの。 [[mac_length]] 等の[[暗号属性]]も指定する。
:[[master secret]]:[[クライアント]]と[[鯖]]で共有される48バイトの秘密。
:[[再開可能]]:新しい[[接続]]の初期化に本[[セッション]]を使えるかどうかの[[フラグ]]。
]FIG]

[3] [[セッション]]を構成する情報は、[[応用データ]]を保護するため[[記録層]]を使うときの[[セキュリティー引数]]を作るために使います [SRC[>>1]]。

* 識別子

[6] [[TLS]] [[セッション識別子]]は、[[セッション]]を[[再開]]する時に [CODE[[[ClientHello]]]]
で[[クライアント]]が指定します [SRC[>>5]]。この[[メッセージ]]は[[平文]]で送信されますから、
[[鯖]]は機密事項を[[セッション識別子]]に含めては[['''なりません''']] [SRC[>>5]]。

* 再開

[4] [[TLS Handshake Protocol]] の[[再開]]機能を使うことで、同じ[[セッション]]を使って複数の[[接続]]を[[実現値化]]できます [SRC[>>1]]。

;; [[TLS session resumption]] を参照。

[FIG(quote)[
[FIGCAPTION[
[7] [CITE@en[RFC 5246 - The Transport Layer Security (TLS) Protocol Version 1.2]]
([TIME[2015-02-19 08:58:15 +09:00]] 版)
<http://tools.ietf.org/html/rfc5246#page-81>
]FIGCAPTION]

> session
>       A TLS session is an association between a client and a server.
>       Sessions are created by the handshake protocol.  Sessions define a
>       set of cryptographic security parameters that can be shared among
>       multiple connections.  Sessions are used to avoid the expensive
>       negotiation of new security parameters for each connection.
>    session identifier
>       A session identifier is a value generated by a server that
>       identifies a particular session.

]FIG]


[8] [CITE[curl - How To Use]]
([TIME[2020-09-21T09:01:13.000Z]], [TIME[2020-10-01T06:22:42.272Z]])
<https://curl.haxx.se/docs/manpage.html#--no-sessionid>