Coverage Report

Created: 2025-04-22 06:18

/src/nss/fuzz/targets/lib/tls/client_config.cc
Line
Count
Source (jump to first uncovered line)
1
/* This Source Code Form is subject to the terms of the Mozilla Public
2
 * License, v. 2.0. If a copy of the MPL was not distributed with this
3
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5
#include "client_config.h"
6
7
#include <cassert>
8
#include <cstddef>
9
#include <cstdint>
10
11
#include "nss_scoped_ptrs.h"
12
#include "nssb64.h"
13
#include "prio.h"
14
#include "prtypes.h"
15
#include "seccomon.h"
16
#include "ssl.h"
17
#include "sslexp.h"
18
19
#include "common.h"
20
21
const SSLCertificateCompressionAlgorithm kCompressionAlg = {
22
    0x1337, "fuzz", TlsCommon::DummyCompressionEncode,
23
    TlsCommon::DummyCompressionDecode};
24
const PRUint8 kPskIdentity[] = "fuzz-psk-identity";
25
#ifndef IS_DTLS_FUZZ
26
const char kEchConfigs[] =
27
    "AEX+"
28
    "DQBBcQAgACDh4IuiuhhInUcKZx5uYcehlG9PQ1ZlzhvVZyjJl7dscQAEAAEAAQASY2xvdWRmbG"
29
    "FyZS1lY2guY29tAAA=";
30
#endif  // IS_DTLS_FUZZ
31
32
static SECStatus AuthCertificateHook(void* arg, PRFileDesc* fd, PRBool checksig,
33
52.0k
                                     PRBool isServer) {
34
52.0k
  assert(!isServer);
35
36
52.0k
  auto config = reinterpret_cast<TlsClient::Config*>(arg);
37
52.0k
  if (config->FailCertificateAuthentication()) return SECFailure;
38
39
51.6k
  return SECSuccess;
40
52.0k
}
41
42
static SECStatus CanFalseStartCallback(PRFileDesc* fd, void* arg,
43
1.89k
                                       PRBool* canFalseStart) {
44
1.89k
  *canFalseStart = true;
45
1.89k
  return SECSuccess;
46
1.89k
}
47
48
namespace TlsClient {
49
50
// XOR 64-bit chunks of data to build a bitmap of config options derived from
51
// the fuzzing input. This seems the only way to fuzz various options while
52
// still maintaining compatibility with BoringSSL or OpenSSL fuzzers.
53
38.0k
Config::Config(const uint8_t* data, size_t len) {
54
38.0k
  union {
55
38.0k
    uint64_t bitmap;
56
38.0k
    struct {
57
38.0k
      uint32_t config;
58
38.0k
      uint16_t ssl_version_range_min;
59
38.0k
      uint16_t ssl_version_range_max;
60
38.0k
    };
61
38.0k
  };
62
63
207M
  for (size_t i = 0; i < len; i++) {
64
207M
    bitmap ^= static_cast<uint64_t>(data[i]) << (8 * (i % 8));
65
207M
  }
66
67
  // Map SSL version values to a valid range.
68
38.0k
  ssl_version_range_min =
69
38.0k
      SSL_VERSION_RANGE_MIN_VALID +
70
38.0k
      (ssl_version_range_min %
71
38.0k
       (1 + SSL_VERSION_RANGE_MAX_VALID - SSL_VERSION_RANGE_MIN_VALID));
72
38.0k
  ssl_version_range_max =
73
38.0k
      ssl_version_range_min +
74
38.0k
      (ssl_version_range_max %
75
38.0k
       (1 + SSL_VERSION_RANGE_MAX_VALID - ssl_version_range_min));
76
77
38.0k
  config_ = config;
78
38.0k
  ssl_version_range_ = {
79
38.0k
      .min = ssl_version_range_min,
80
38.0k
      .max = ssl_version_range_max,
81
38.0k
  };
82
38.0k
}
83
84
38.0k
void Config::SetCallbacks(PRFileDesc* fd) {
85
38.0k
  SECStatus rv = SSL_AuthCertificateHook(fd, AuthCertificateHook, this);
86
38.0k
  assert(rv == SECSuccess);
87
88
38.0k
  rv = SSL_SetCanFalseStartCallback(fd, CanFalseStartCallback, nullptr);
89
38.0k
  assert(rv == SECSuccess);
90
38.0k
}
91
92
38.0k
void Config::SetSocketOptions(PRFileDesc* fd) {
93
38.0k
  SECStatus rv = SSL_OptionSet(fd, SSL_ENABLE_EXTENDED_MASTER_SECRET,
94
38.0k
                               this->EnableExtendedMasterSecret());
95
38.0k
  assert(rv == SECSuccess);
96
97
38.0k
  rv = SSL_OptionSet(fd, SSL_REQUIRE_DH_NAMED_GROUPS,
98
38.0k
                     this->RequireDhNamedGroups());
99
38.0k
  assert(rv == SECSuccess);
100
101
38.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_FALSE_START, this->EnableFalseStart());
102
38.0k
  assert(rv == SECSuccess);
103
104
38.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_DEFLATE, this->EnableDeflate());
105
38.0k
  assert(rv == SECSuccess);
106
107
38.0k
  rv = SSL_OptionSet(fd, SSL_CBC_RANDOM_IV, this->CbcRandomIv());
108
38.0k
  assert(rv == SECSuccess);
109
110
38.0k
  rv = SSL_OptionSet(fd, SSL_REQUIRE_SAFE_NEGOTIATION,
111
38.0k
                     this->RequireSafeNegotiation());
112
38.0k
  assert(rv == SECSuccess);
113
114
38.0k
  rv = SSL_OptionSet(fd, SSL_NO_CACHE, this->NoCache());
115
38.0k
  assert(rv == SECSuccess);
116
117
38.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_GREASE, this->EnableGrease());
118
38.0k
  assert(rv == SECSuccess);
119
120
38.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_CH_EXTENSION_PERMUTATION,
121
38.0k
                     this->EnableCHExtensionPermutation());
122
38.0k
  assert(rv == SECSuccess);
123
124
38.0k
  if (this->SetCertificateCompressionAlgorithm()) {
125
18.8k
    rv = SSL_SetCertificateCompressionAlgorithm(fd, kCompressionAlg);
126
18.8k
    assert(rv == SECSuccess);
127
18.8k
  }
128
129
38.0k
  if (this->SetVersionRange()) {
130
13.6k
    rv = SSL_VersionRangeSet(fd, &ssl_version_range_);
131
13.6k
    assert(rv == SECSuccess);
132
13.6k
  }
133
134
38.0k
  if (this->AddExternalPsk()) {
135
19.4k
    ScopedPK11SlotInfo slot(PK11_GetInternalSlot());
136
19.4k
    assert(slot);
137
138
19.4k
    ScopedPK11SymKey key(PK11_KeyGen(slot.get(), CKM_NSS_CHACHA20_POLY1305,
139
19.4k
                                     nullptr, 32, nullptr));
140
19.4k
    assert(key);
141
142
19.4k
    rv = SSL_AddExternalPsk(fd, key.get(), kPskIdentity,
143
19.4k
                            sizeof(kPskIdentity) - 1, this->PskHashType());
144
19.4k
    assert(rv == SECSuccess);
145
19.4k
  }
146
147
38.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_POST_HANDSHAKE_AUTH,
148
38.0k
                     this->EnablePostHandshakeAuth());
149
38.0k
  assert(rv == SECSuccess);
150
151
38.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_0RTT_DATA, this->EnableZeroRtt());
152
38.0k
  assert(rv == SECSuccess);
153
154
38.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_ALPN, this->EnableAlpn());
155
38.0k
  assert(rv == SECSuccess);
156
157
38.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_FALLBACK_SCSV, this->EnableFallbackScsv());
158
38.0k
  assert(rv == SECSuccess);
159
160
38.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_OCSP_STAPLING, this->EnableOcspStapling());
161
38.0k
  assert(rv == SECSuccess);
162
163
38.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_SESSION_TICKETS,
164
38.0k
                     this->EnableSessionTickets());
165
38.0k
  assert(rv == SECSuccess);
166
167
38.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_TLS13_COMPAT_MODE,
168
38.0k
                     this->EnableTls13CompatMode());
169
38.0k
  assert(rv == SECSuccess);
170
171
38.0k
  rv = SSL_OptionSet(fd, SSL_NO_LOCKS, this->NoLocks());
172
38.0k
  assert(rv == SECSuccess);
173
174
38.0k
  rv = SSL_EnableTls13GreaseEch(fd, this->EnableTls13GreaseEch());
175
38.0k
  assert(rv == SECSuccess);
176
177
38.0k
  rv = SSL_SetDtls13VersionWorkaround(fd, this->SetDtls13VersionWorkaround());
178
38.0k
  assert(rv == SECSuccess);
179
180
38.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_DELEGATED_CREDENTIALS,
181
38.0k
                     this->EnableDelegatedCredentials());
182
38.0k
  assert(rv == SECSuccess);
183
184
38.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_DTLS_SHORT_HEADER,
185
38.0k
                     this->EnableDtlsShortHeader());
186
38.0k
  assert(rv == SECSuccess);
187
188
#ifndef IS_DTLS_FUZZ
189
19.8k
  rv =
190
19.8k
      SSL_OptionSet(fd, SSL_ENABLE_RENEGOTIATION, SSL_RENEGOTIATE_UNRESTRICTED);
191
19.8k
  assert(rv == SECSuccess);
192
193
19.8k
  if (this->SetClientEchConfigs()) {
194
9.04k
    ScopedSECItem echConfigsBin(NSSBase64_DecodeBuffer(
195
9.04k
        nullptr, nullptr, kEchConfigs, sizeof(kEchConfigs)));
196
9.04k
    assert(echConfigsBin);
197
198
9.04k
    rv = SSL_SetClientEchConfigs(fd, echConfigsBin->data, echConfigsBin->len);
199
9.04k
    assert(rv == SECSuccess);
200
9.04k
  }
201
#endif  // IS_DTLS_FUZZ
202
19.8k
}
TlsClient::Config::SetSocketOptions(PRFileDesc*)
Line
Count
Source
92
18.2k
void Config::SetSocketOptions(PRFileDesc* fd) {
93
18.2k
  SECStatus rv = SSL_OptionSet(fd, SSL_ENABLE_EXTENDED_MASTER_SECRET,
94
18.2k
                               this->EnableExtendedMasterSecret());
95
18.2k
  assert(rv == SECSuccess);
96
97
18.2k
  rv = SSL_OptionSet(fd, SSL_REQUIRE_DH_NAMED_GROUPS,
98
18.2k
                     this->RequireDhNamedGroups());
99
18.2k
  assert(rv == SECSuccess);
100
101
18.2k
  rv = SSL_OptionSet(fd, SSL_ENABLE_FALSE_START, this->EnableFalseStart());
102
18.2k
  assert(rv == SECSuccess);
103
104
18.2k
  rv = SSL_OptionSet(fd, SSL_ENABLE_DEFLATE, this->EnableDeflate());
105
18.2k
  assert(rv == SECSuccess);
106
107
18.2k
  rv = SSL_OptionSet(fd, SSL_CBC_RANDOM_IV, this->CbcRandomIv());
108
18.2k
  assert(rv == SECSuccess);
109
110
18.2k
  rv = SSL_OptionSet(fd, SSL_REQUIRE_SAFE_NEGOTIATION,
111
18.2k
                     this->RequireSafeNegotiation());
112
18.2k
  assert(rv == SECSuccess);
113
114
18.2k
  rv = SSL_OptionSet(fd, SSL_NO_CACHE, this->NoCache());
115
18.2k
  assert(rv == SECSuccess);
116
117
18.2k
  rv = SSL_OptionSet(fd, SSL_ENABLE_GREASE, this->EnableGrease());
118
18.2k
  assert(rv == SECSuccess);
119
120
18.2k
  rv = SSL_OptionSet(fd, SSL_ENABLE_CH_EXTENSION_PERMUTATION,
121
18.2k
                     this->EnableCHExtensionPermutation());
122
18.2k
  assert(rv == SECSuccess);
123
124
18.2k
  if (this->SetCertificateCompressionAlgorithm()) {
125
9.03k
    rv = SSL_SetCertificateCompressionAlgorithm(fd, kCompressionAlg);
126
9.03k
    assert(rv == SECSuccess);
127
9.03k
  }
128
129
18.2k
  if (this->SetVersionRange()) {
130
6.81k
    rv = SSL_VersionRangeSet(fd, &ssl_version_range_);
131
6.81k
    assert(rv == SECSuccess);
132
6.81k
  }
133
134
18.2k
  if (this->AddExternalPsk()) {
135
9.35k
    ScopedPK11SlotInfo slot(PK11_GetInternalSlot());
136
9.35k
    assert(slot);
137
138
9.35k
    ScopedPK11SymKey key(PK11_KeyGen(slot.get(), CKM_NSS_CHACHA20_POLY1305,
139
9.35k
                                     nullptr, 32, nullptr));
140
9.35k
    assert(key);
141
142
9.35k
    rv = SSL_AddExternalPsk(fd, key.get(), kPskIdentity,
143
9.35k
                            sizeof(kPskIdentity) - 1, this->PskHashType());
144
9.35k
    assert(rv == SECSuccess);
145
9.35k
  }
146
147
18.2k
  rv = SSL_OptionSet(fd, SSL_ENABLE_POST_HANDSHAKE_AUTH,
148
18.2k
                     this->EnablePostHandshakeAuth());
149
18.2k
  assert(rv == SECSuccess);
150
151
18.2k
  rv = SSL_OptionSet(fd, SSL_ENABLE_0RTT_DATA, this->EnableZeroRtt());
152
18.2k
  assert(rv == SECSuccess);
153
154
18.2k
  rv = SSL_OptionSet(fd, SSL_ENABLE_ALPN, this->EnableAlpn());
155
18.2k
  assert(rv == SECSuccess);
156
157
18.2k
  rv = SSL_OptionSet(fd, SSL_ENABLE_FALLBACK_SCSV, this->EnableFallbackScsv());
158
18.2k
  assert(rv == SECSuccess);
159
160
18.2k
  rv = SSL_OptionSet(fd, SSL_ENABLE_OCSP_STAPLING, this->EnableOcspStapling());
161
18.2k
  assert(rv == SECSuccess);
162
163
18.2k
  rv = SSL_OptionSet(fd, SSL_ENABLE_SESSION_TICKETS,
164
18.2k
                     this->EnableSessionTickets());
165
18.2k
  assert(rv == SECSuccess);
166
167
18.2k
  rv = SSL_OptionSet(fd, SSL_ENABLE_TLS13_COMPAT_MODE,
168
18.2k
                     this->EnableTls13CompatMode());
169
18.2k
  assert(rv == SECSuccess);
170
171
18.2k
  rv = SSL_OptionSet(fd, SSL_NO_LOCKS, this->NoLocks());
172
18.2k
  assert(rv == SECSuccess);
173
174
18.2k
  rv = SSL_EnableTls13GreaseEch(fd, this->EnableTls13GreaseEch());
175
18.2k
  assert(rv == SECSuccess);
176
177
18.2k
  rv = SSL_SetDtls13VersionWorkaround(fd, this->SetDtls13VersionWorkaround());
178
18.2k
  assert(rv == SECSuccess);
179
180
18.2k
  rv = SSL_OptionSet(fd, SSL_ENABLE_DELEGATED_CREDENTIALS,
181
18.2k
                     this->EnableDelegatedCredentials());
182
18.2k
  assert(rv == SECSuccess);
183
184
18.2k
  rv = SSL_OptionSet(fd, SSL_ENABLE_DTLS_SHORT_HEADER,
185
18.2k
                     this->EnableDtlsShortHeader());
186
18.2k
  assert(rv == SECSuccess);
187
188
#ifndef IS_DTLS_FUZZ
189
  rv =
190
      SSL_OptionSet(fd, SSL_ENABLE_RENEGOTIATION, SSL_RENEGOTIATE_UNRESTRICTED);
191
  assert(rv == SECSuccess);
192
193
  if (this->SetClientEchConfigs()) {
194
    ScopedSECItem echConfigsBin(NSSBase64_DecodeBuffer(
195
        nullptr, nullptr, kEchConfigs, sizeof(kEchConfigs)));
196
    assert(echConfigsBin);
197
198
    rv = SSL_SetClientEchConfigs(fd, echConfigsBin->data, echConfigsBin->len);
199
    assert(rv == SECSuccess);
200
  }
201
#endif  // IS_DTLS_FUZZ
202
18.2k
}
TlsClient::Config::SetSocketOptions(PRFileDesc*)
Line
Count
Source
92
19.8k
void Config::SetSocketOptions(PRFileDesc* fd) {
93
19.8k
  SECStatus rv = SSL_OptionSet(fd, SSL_ENABLE_EXTENDED_MASTER_SECRET,
94
19.8k
                               this->EnableExtendedMasterSecret());
95
19.8k
  assert(rv == SECSuccess);
96
97
19.8k
  rv = SSL_OptionSet(fd, SSL_REQUIRE_DH_NAMED_GROUPS,
98
19.8k
                     this->RequireDhNamedGroups());
99
19.8k
  assert(rv == SECSuccess);
100
101
19.8k
  rv = SSL_OptionSet(fd, SSL_ENABLE_FALSE_START, this->EnableFalseStart());
102
19.8k
  assert(rv == SECSuccess);
103
104
19.8k
  rv = SSL_OptionSet(fd, SSL_ENABLE_DEFLATE, this->EnableDeflate());
105
19.8k
  assert(rv == SECSuccess);
106
107
19.8k
  rv = SSL_OptionSet(fd, SSL_CBC_RANDOM_IV, this->CbcRandomIv());
108
19.8k
  assert(rv == SECSuccess);
109
110
19.8k
  rv = SSL_OptionSet(fd, SSL_REQUIRE_SAFE_NEGOTIATION,
111
19.8k
                     this->RequireSafeNegotiation());
112
19.8k
  assert(rv == SECSuccess);
113
114
19.8k
  rv = SSL_OptionSet(fd, SSL_NO_CACHE, this->NoCache());
115
19.8k
  assert(rv == SECSuccess);
116
117
19.8k
  rv = SSL_OptionSet(fd, SSL_ENABLE_GREASE, this->EnableGrease());
118
19.8k
  assert(rv == SECSuccess);
119
120
19.8k
  rv = SSL_OptionSet(fd, SSL_ENABLE_CH_EXTENSION_PERMUTATION,
121
19.8k
                     this->EnableCHExtensionPermutation());
122
19.8k
  assert(rv == SECSuccess);
123
124
19.8k
  if (this->SetCertificateCompressionAlgorithm()) {
125
9.84k
    rv = SSL_SetCertificateCompressionAlgorithm(fd, kCompressionAlg);
126
9.84k
    assert(rv == SECSuccess);
127
9.84k
  }
128
129
19.8k
  if (this->SetVersionRange()) {
130
6.84k
    rv = SSL_VersionRangeSet(fd, &ssl_version_range_);
131
6.84k
    assert(rv == SECSuccess);
132
6.84k
  }
133
134
19.8k
  if (this->AddExternalPsk()) {
135
10.0k
    ScopedPK11SlotInfo slot(PK11_GetInternalSlot());
136
10.0k
    assert(slot);
137
138
10.0k
    ScopedPK11SymKey key(PK11_KeyGen(slot.get(), CKM_NSS_CHACHA20_POLY1305,
139
10.0k
                                     nullptr, 32, nullptr));
140
10.0k
    assert(key);
141
142
10.0k
    rv = SSL_AddExternalPsk(fd, key.get(), kPskIdentity,
143
10.0k
                            sizeof(kPskIdentity) - 1, this->PskHashType());
144
10.0k
    assert(rv == SECSuccess);
145
10.0k
  }
146
147
19.8k
  rv = SSL_OptionSet(fd, SSL_ENABLE_POST_HANDSHAKE_AUTH,
148
19.8k
                     this->EnablePostHandshakeAuth());
149
19.8k
  assert(rv == SECSuccess);
150
151
19.8k
  rv = SSL_OptionSet(fd, SSL_ENABLE_0RTT_DATA, this->EnableZeroRtt());
152
19.8k
  assert(rv == SECSuccess);
153
154
19.8k
  rv = SSL_OptionSet(fd, SSL_ENABLE_ALPN, this->EnableAlpn());
155
19.8k
  assert(rv == SECSuccess);
156
157
19.8k
  rv = SSL_OptionSet(fd, SSL_ENABLE_FALLBACK_SCSV, this->EnableFallbackScsv());
158
19.8k
  assert(rv == SECSuccess);
159
160
19.8k
  rv = SSL_OptionSet(fd, SSL_ENABLE_OCSP_STAPLING, this->EnableOcspStapling());
161
19.8k
  assert(rv == SECSuccess);
162
163
19.8k
  rv = SSL_OptionSet(fd, SSL_ENABLE_SESSION_TICKETS,
164
19.8k
                     this->EnableSessionTickets());
165
19.8k
  assert(rv == SECSuccess);
166
167
19.8k
  rv = SSL_OptionSet(fd, SSL_ENABLE_TLS13_COMPAT_MODE,
168
19.8k
                     this->EnableTls13CompatMode());
169
19.8k
  assert(rv == SECSuccess);
170
171
19.8k
  rv = SSL_OptionSet(fd, SSL_NO_LOCKS, this->NoLocks());
172
19.8k
  assert(rv == SECSuccess);
173
174
19.8k
  rv = SSL_EnableTls13GreaseEch(fd, this->EnableTls13GreaseEch());
175
19.8k
  assert(rv == SECSuccess);
176
177
19.8k
  rv = SSL_SetDtls13VersionWorkaround(fd, this->SetDtls13VersionWorkaround());
178
19.8k
  assert(rv == SECSuccess);
179
180
19.8k
  rv = SSL_OptionSet(fd, SSL_ENABLE_DELEGATED_CREDENTIALS,
181
19.8k
                     this->EnableDelegatedCredentials());
182
19.8k
  assert(rv == SECSuccess);
183
184
19.8k
  rv = SSL_OptionSet(fd, SSL_ENABLE_DTLS_SHORT_HEADER,
185
19.8k
                     this->EnableDtlsShortHeader());
186
19.8k
  assert(rv == SECSuccess);
187
188
19.8k
#ifndef IS_DTLS_FUZZ
189
19.8k
  rv =
190
19.8k
      SSL_OptionSet(fd, SSL_ENABLE_RENEGOTIATION, SSL_RENEGOTIATE_UNRESTRICTED);
191
19.8k
  assert(rv == SECSuccess);
192
193
19.8k
  if (this->SetClientEchConfigs()) {
194
9.04k
    ScopedSECItem echConfigsBin(NSSBase64_DecodeBuffer(
195
9.04k
        nullptr, nullptr, kEchConfigs, sizeof(kEchConfigs)));
196
9.04k
    assert(echConfigsBin);
197
198
9.04k
    rv = SSL_SetClientEchConfigs(fd, echConfigsBin->data, echConfigsBin->len);
199
9.04k
    assert(rv == SECSuccess);
200
9.04k
  }
201
19.8k
#endif  // IS_DTLS_FUZZ
202
19.8k
}
203
204
0
std::ostream& operator<<(std::ostream& out, Config& config) {
205
0
  out << "============= ClientConfig ============="
206
0
      << "\n";
207
0
  out << "SSL_NO_CACHE:                           " << config.NoCache() << "\n";
208
0
  out << "SSL_ENABLE_EXTENDED_MASTER_SECRET:      "
209
0
      << config.EnableExtendedMasterSecret() << "\n";
210
0
  out << "SSL_REQUIRE_DH_NAMED_GROUPS:            "
211
0
      << config.RequireDhNamedGroups() << "\n";
212
0
  out << "SSL_ENABLE_FALSE_START:                 " << config.EnableFalseStart()
213
0
      << "\n";
214
0
  out << "SSL_ENABLE_DEFLATE:                     " << config.EnableDeflate()
215
0
      << "\n";
216
0
  out << "SSL_CBC_RANDOM_IV:                      " << config.CbcRandomIv()
217
0
      << "\n";
218
0
  out << "SSL_REQUIRE_SAFE_NEGOTIATION:           "
219
0
      << config.RequireSafeNegotiation() << "\n";
220
0
  out << "SSL_ENABLE_GREASE:                      " << config.EnableGrease()
221
0
      << "\n";
222
0
  out << "SSL_ENABLE_CH_EXTENSION_PERMUTATION:    "
223
0
      << config.EnableCHExtensionPermutation() << "\n";
224
0
  out << "SSL_SetCertificateCompressionAlgorithm: "
225
0
      << config.SetCertificateCompressionAlgorithm() << "\n";
226
0
  out << "SSL_VersionRangeSet:                    " << config.SetVersionRange()
227
0
      << "\n";
228
0
  out << "  Min:                                  "
229
0
      << config.SslVersionRange().min << "\n";
230
0
  out << "  Max:                                  "
231
0
      << config.SslVersionRange().max << "\n";
232
0
  out << "SSL_AddExternalPsk:                     " << config.AddExternalPsk()
233
0
      << "\n";
234
0
  out << "  Type:                                 " << config.PskHashType()
235
0
      << "\n";
236
0
  out << "SSL_ENABLE_POST_HANDSHAKE_AUTH:         "
237
0
      << config.EnablePostHandshakeAuth() << "\n";
238
0
  out << "SSL_ENABLE_0RTT_DATA:                   " << config.EnableZeroRtt()
239
0
      << "\n";
240
0
  out << "SSL_ENABLE_ALPN:                        " << config.EnableAlpn()
241
0
      << "\n";
242
0
  out << "SSL_ENABLE_FALLBACK_SCSV:               "
243
0
      << config.EnableFallbackScsv() << "\n";
244
0
  out << "SSL_ENABLE_OCSP_STAPLING:               "
245
0
      << config.EnableOcspStapling() << "\n";
246
0
  out << "SSL_ENABLE_SESSION_TICKETS:             "
247
0
      << config.EnableSessionTickets() << "\n";
248
0
  out << "SSL_ENABLE_TLS13_COMPAT_MODE:           "
249
0
      << config.EnableTls13CompatMode() << "\n";
250
0
  out << "SSL_NO_LOCKS:                           " << config.NoLocks() << "\n";
251
0
  out << "SSL_EnableTls13GreaseEch:               "
252
0
      << config.EnableTls13GreaseEch() << "\n";
253
0
  out << "SSL_SetDtls13VersionWorkaround:         "
254
0
      << config.SetDtls13VersionWorkaround() << "\n";
255
0
  out << "SSL_SetClientEchConfigs:                "
256
0
      << config.SetClientEchConfigs() << "\n";
257
0
  out << "========================================";
258
259
0
  return out;
260
0
}
261
262
}  // namespace TlsClient