summaryrefslogtreecommitdiffstats
path: root/security/nss/lib/ssl/tls13exthandle.h
blob: d4929be551ef9f0e9e9485cfd32580d9fd9d8743 (plain)
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
123
124
125
126
127
128
129
130
131
132
133
134
135
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is PRIVATE to SSL.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef __tls13exthandle_h_
#define __tls13exthandle_h_

SECStatus tls13_ServerSendStatusRequestXtn(const sslSocket *ss,
                                           TLSExtensionData *xtnData,
                                           sslBuffer *buf, PRBool *append);
SECStatus tls13_ClientSendKeyShareXtn(const sslSocket *ss,
                                      TLSExtensionData *xtnData,
                                      sslBuffer *buf, PRBool *append);
SECStatus tls13_ClientHandleKeyShareXtn(const sslSocket *ss,
                                        TLSExtensionData *xtnData,
                                        SECItem *data);
SECStatus tls13_ClientHandleKeyShareXtnHrr(const sslSocket *ss,
                                           TLSExtensionData *xtnData,
                                           SECItem *data);
SECStatus tls13_ServerHandleKeyShareXtn(const sslSocket *ss,
                                        TLSExtensionData *xtnData,
                                        SECItem *data);
SECStatus tls13_ServerSendKeyShareXtn(const sslSocket *ss,
                                      TLSExtensionData *xtnData,
                                      sslBuffer *buf, PRBool *append);
SECStatus tls13_ClientSendPreSharedKeyXtn(const sslSocket *ss,
                                          TLSExtensionData *xtnData,
                                          sslBuffer *buf, PRBool *append);
SECStatus tls13_ServerHandlePreSharedKeyXtn(const sslSocket *ss,
                                            TLSExtensionData *xtnData,
                                            SECItem *data);
SECStatus tls13_ClientHandlePreSharedKeyXtn(const sslSocket *ss,
                                            TLSExtensionData *xtnData,
                                            SECItem *data);
SECStatus tls13_ServerSendPreSharedKeyXtn(const sslSocket *ss,
                                          TLSExtensionData *xtnData,
                                          sslBuffer *buf, PRBool *append);
SECStatus tls13_ClientSendEarlyDataXtn(const sslSocket *ss,
                                       TLSExtensionData *xtnData,
                                       sslBuffer *buf, PRBool *append);
SECStatus tls13_ServerHandleEarlyDataXtn(const sslSocket *ss,
                                         TLSExtensionData *xtnData,
                                         SECItem *data);
SECStatus tls13_ClientHandleEarlyDataXtn(const sslSocket *ss,
                                         TLSExtensionData *xtnData,
                                         SECItem *data);
SECStatus tls13_ClientHandleTicketEarlyDataXtn(const sslSocket *ss,
                                               TLSExtensionData *xtnData,
                                               SECItem *data);
SECStatus tls13_ClientSendSupportedVersionsXtn(const sslSocket *ss,
                                               TLSExtensionData *xtnData,
                                               sslBuffer *buf, PRBool *append);
SECStatus tls13_ServerSendSupportedVersionsXtn(const sslSocket *ss,
                                               TLSExtensionData *xtnData,
                                               sslBuffer *buf, PRBool *added);
SECStatus tls13_ClientHandleHrrCookie(const sslSocket *ss,
                                      TLSExtensionData *xtnData,
                                      SECItem *data);
SECStatus tls13_ClientSendHrrCookieXtn(const sslSocket *ss,
                                       TLSExtensionData *xtnData,
                                       sslBuffer *buf, PRBool *append);
SECStatus tls13_ClientSendPskModesXtn(const sslSocket *ss,
                                      TLSExtensionData *xtnData,
                                      sslBuffer *buf, PRBool *append);
SECStatus tls13_ServerHandlePskModesXtn(const sslSocket *ss,
                                        TLSExtensionData *xtnData,
                                        SECItem *data);
SECStatus tls13_SendCertAuthoritiesXtn(const sslSocket *ss,
                                       TLSExtensionData *xtnData,
                                       sslBuffer *buf, PRBool *append);
SECStatus tls13_ClientHandleCertAuthoritiesXtn(const sslSocket *ss,
                                               TLSExtensionData *xtnData,
                                               SECItem *data);
SECStatus tls13_ServerHandleCertAuthoritiesXtn(const sslSocket *ss, TLSExtensionData *xtnData, SECItem *data);

SECStatus tls13_ServerHandleCookieXtn(const sslSocket *ss,
                                      TLSExtensionData *xtnData,
                                      SECItem *data);
SECStatus tls13_ServerSendHrrKeyShareXtn(const sslSocket *ss,
                                         TLSExtensionData *xtnData,
                                         sslBuffer *buf, PRBool *added);
SECStatus tls13_ServerSendHrrCookieXtn(const sslSocket *ss,
                                       TLSExtensionData *xtnData,
                                       sslBuffer *buf, PRBool *added);
SECStatus tls13_DecodeKeyShareEntry(sslReader *rdr, TLS13KeyShareEntry **ksp);
PRUint32 tls13_SizeOfKeyShareEntry(const sslEphemeralKeyPair *keyPair);
SECStatus tls13_EncodeKeyShareEntry(sslBuffer *buf, sslEphemeralKeyPair *keyPair);
SECStatus tls13_ServerHandleInnerEchXtn(const sslSocket *ss, TLSExtensionData *xtnData,
                                        SECItem *data);
SECStatus tls13_ServerHandleOuterEchXtn(const sslSocket *ss, TLSExtensionData *xtnData,
                                        SECItem *data);
SECStatus tls13_ServerSendHrrEchXtn(const sslSocket *ss, TLSExtensionData *xtnData,
                                    sslBuffer *buf, PRBool *added);
SECStatus tls13_ServerSendEchXtn(const sslSocket *ss, TLSExtensionData *xtnData,
                                 sslBuffer *buf, PRBool *added);
SECStatus tls13_ClientHandleHrrEchXtn(const sslSocket *ss, TLSExtensionData *xtnData,
                                      SECItem *data);
SECStatus tls13_ClientHandleEchXtn(const sslSocket *ss, TLSExtensionData *xtnData,
                                   SECItem *data);
SECStatus tls13_ClientSendPostHandshakeAuthXtn(const sslSocket *ss,
                                               TLSExtensionData *xtnData,
                                               sslBuffer *buf, PRBool *added);
SECStatus tls13_ServerHandlePostHandshakeAuthXtn(const sslSocket *ss,
                                                 TLSExtensionData *xtnData,
                                                 SECItem *data);
SECStatus tls13_ClientHandleDelegatedCredentialsXtn(const sslSocket *ss,
                                                    TLSExtensionData *xtnData,
                                                    SECItem *data);
SECStatus tls13_ClientSendDelegatedCredentialsXtn(const sslSocket *ss,
                                                  TLSExtensionData *xtnData,
                                                  sslBuffer *buf, PRBool *added);
SECStatus tls13_ServerHandleDelegatedCredentialsXtn(const sslSocket *ss,
                                                    TLSExtensionData *xtnData,
                                                    SECItem *data);
SECStatus tls13_SendEmptyGreaseXtn(const sslSocket *ss,
                                   TLSExtensionData *xtnData,
                                   sslBuffer *buf, PRBool *added);
SECStatus tls13_SendGreaseXtn(const sslSocket *ss,
                              TLSExtensionData *xtnData,
                              sslBuffer *buf, PRBool *added);

const char *ssl3_mapCertificateCompressionAlgorithmToName(const sslSocket *ss,
                                                          SSLCertificateCompressionAlgorithmID alg);

SECStatus ssl3_SendCertificateCompressionXtn(const sslSocket *ss,
                                             TLSExtensionData *xtnData,
                                             sslBuffer *buf, PRBool *added);
SECStatus ssl3_HandleCertificateCompressionXtn(const sslSocket *ss,
                                               TLSExtensionData *xtnData,
                                               SECItem *data);
#endif