Coverage Report

Created: 2025-11-19 06:34

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/nss/fuzz/targets/lib/tls/client_config.cc
Line
Count
Source
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
53.2k
                                     PRBool isServer) {
34
53.2k
  assert(!isServer);
35
36
53.2k
  auto config = reinterpret_cast<TlsClient::Config*>(arg);
37
53.2k
  if (config->FailCertificateAuthentication()) return SECFailure;
38
39
52.5k
  return SECSuccess;
40
53.2k
}
41
42
static SECStatus CanFalseStartCallback(PRFileDesc* fd, void* arg,
43
2.18k
                                       PRBool* canFalseStart) {
44
2.18k
  *canFalseStart = true;
45
2.18k
  return SECSuccess;
46
2.18k
}
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
31.1k
Config::Config(const uint8_t* data, size_t len) {
54
31.1k
  union {
55
31.1k
    uint64_t bitmap;
56
31.1k
    struct {
57
31.1k
      uint32_t config;
58
31.1k
      uint16_t ssl_version_range_min;
59
31.1k
      uint16_t ssl_version_range_max;
60
31.1k
    };
61
31.1k
  };
62
63
195M
  for (size_t i = 0; i < len; i++) {
64
195M
    bitmap ^= static_cast<uint64_t>(data[i]) << (8 * (i % 8));
65
195M
  }
66
67
  // Map SSL version values to a valid range.
68
31.1k
  ssl_version_range_min =
69
31.1k
      SSL_VERSION_RANGE_MIN_VALID +
70
31.1k
      (ssl_version_range_min %
71
31.1k
       (1 + SSL_VERSION_RANGE_MAX_VALID - SSL_VERSION_RANGE_MIN_VALID));
72
31.1k
  ssl_version_range_max =
73
31.1k
      ssl_version_range_min +
74
31.1k
      (ssl_version_range_max %
75
31.1k
       (1 + SSL_VERSION_RANGE_MAX_VALID - ssl_version_range_min));
76
77
31.1k
  config_ = config;
78
31.1k
  ssl_version_range_ = {
79
31.1k
      .min = ssl_version_range_min,
80
31.1k
      .max = ssl_version_range_max,
81
31.1k
  };
82
31.1k
}
83
84
31.1k
void Config::SetCallbacks(PRFileDesc* fd) {
85
31.1k
  SECStatus rv = SSL_AuthCertificateHook(fd, AuthCertificateHook, this);
86
31.1k
  assert(rv == SECSuccess);
87
88
31.1k
  rv = SSL_SetCanFalseStartCallback(fd, CanFalseStartCallback, nullptr);
89
31.1k
  assert(rv == SECSuccess);
90
31.1k
}
91
92
31.1k
void Config::SetSocketOptions(PRFileDesc* fd) {
93
31.1k
  SECStatus rv = SSL_OptionSet(fd, SSL_ENABLE_EXTENDED_MASTER_SECRET,
94
31.1k
                               this->EnableExtendedMasterSecret());
95
31.1k
  assert(rv == SECSuccess);
96
97
31.1k
  rv = SSL_OptionSet(fd, SSL_REQUIRE_DH_NAMED_GROUPS,
98
31.1k
                     this->RequireDhNamedGroups());
99
31.1k
  assert(rv == SECSuccess);
100
101
31.1k
  rv = SSL_OptionSet(fd, SSL_ENABLE_FALSE_START, this->EnableFalseStart());
102
31.1k
  assert(rv == SECSuccess);
103
104
31.1k
  rv = SSL_OptionSet(fd, SSL_ENABLE_DEFLATE, this->EnableDeflate());
105
31.1k
  assert(rv == SECSuccess);
106
107
31.1k
  rv = SSL_OptionSet(fd, SSL_CBC_RANDOM_IV, this->CbcRandomIv());
108
31.1k
  assert(rv == SECSuccess);
109
110
31.1k
  rv = SSL_OptionSet(fd, SSL_REQUIRE_SAFE_NEGOTIATION,
111
31.1k
                     this->RequireSafeNegotiation());
112
31.1k
  assert(rv == SECSuccess);
113
114
31.1k
  rv = SSL_OptionSet(fd, SSL_NO_CACHE, this->NoCache());
115
31.1k
  assert(rv == SECSuccess);
116
117
31.1k
  rv = SSL_OptionSet(fd, SSL_ENABLE_GREASE, this->EnableGrease());
118
31.1k
  assert(rv == SECSuccess);
119
120
31.1k
  rv = SSL_OptionSet(fd, SSL_ENABLE_CH_EXTENSION_PERMUTATION,
121
31.1k
                     this->EnableCHExtensionPermutation());
122
31.1k
  assert(rv == SECSuccess);
123
124
31.1k
  if (this->SetCertificateCompressionAlgorithm()) {
125
15.5k
    rv = SSL_SetCertificateCompressionAlgorithm(fd, kCompressionAlg);
126
15.5k
    assert(rv == SECSuccess);
127
15.5k
  }
128
129
31.1k
  if (this->SetVersionRange()) {
130
20.9k
    rv = SSL_VersionRangeSet(fd, &ssl_version_range_);
131
20.9k
    assert(rv == SECSuccess);
132
20.9k
  }
133
134
31.1k
  if (this->AddExternalPsk()) {
135
15.9k
    ScopedPK11SlotInfo slot(PK11_GetInternalSlot());
136
15.9k
    assert(slot);
137
138
15.9k
    ScopedPK11SymKey key(PK11_KeyGen(slot.get(), CKM_NSS_CHACHA20_POLY1305,
139
15.9k
                                     nullptr, 32, nullptr));
140
15.9k
    assert(key);
141
142
15.9k
    rv = SSL_AddExternalPsk(fd, key.get(), kPskIdentity,
143
15.9k
                            sizeof(kPskIdentity) - 1, this->PskHashType());
144
15.9k
    assert(rv == SECSuccess);
145
15.9k
  }
146
147
31.1k
  rv = SSL_OptionSet(fd, SSL_ENABLE_POST_HANDSHAKE_AUTH,
148
31.1k
                     this->EnablePostHandshakeAuth());
149
31.1k
  assert(rv == SECSuccess);
150
151
31.1k
  rv = SSL_OptionSet(fd, SSL_ENABLE_0RTT_DATA, this->EnableZeroRtt());
152
31.1k
  assert(rv == SECSuccess);
153
154
31.1k
  rv = SSL_OptionSet(fd, SSL_ENABLE_ALPN, this->EnableAlpn());
155
31.1k
  assert(rv == SECSuccess);
156
157
31.1k
  rv = SSL_OptionSet(fd, SSL_ENABLE_FALLBACK_SCSV, this->EnableFallbackScsv());
158
31.1k
  assert(rv == SECSuccess);
159
160
31.1k
  rv = SSL_OptionSet(fd, SSL_ENABLE_OCSP_STAPLING, this->EnableOcspStapling());
161
31.1k
  assert(rv == SECSuccess);
162
163
31.1k
  rv = SSL_OptionSet(fd, SSL_ENABLE_SESSION_TICKETS,
164
31.1k
                     this->EnableSessionTickets());
165
31.1k
  assert(rv == SECSuccess);
166
167
31.1k
  rv = SSL_OptionSet(fd, SSL_ENABLE_TLS13_COMPAT_MODE,
168
31.1k
                     this->EnableTls13CompatMode());
169
31.1k
  assert(rv == SECSuccess);
170
171
31.1k
  rv = SSL_OptionSet(fd, SSL_NO_LOCKS, this->NoLocks());
172
31.1k
  assert(rv == SECSuccess);
173
174
31.1k
  rv = SSL_EnableTls13GreaseEch(fd, this->EnableTls13GreaseEch());
175
31.1k
  assert(rv == SECSuccess);
176
177
31.1k
  rv = SSL_SetDtls13VersionWorkaround(fd, this->SetDtls13VersionWorkaround());
178
31.1k
  assert(rv == SECSuccess);
179
180
31.1k
  rv = SSL_OptionSet(fd, SSL_ENABLE_DELEGATED_CREDENTIALS,
181
31.1k
                     this->EnableDelegatedCredentials());
182
31.1k
  assert(rv == SECSuccess);
183
184
31.1k
  rv = SSL_OptionSet(fd, SSL_ENABLE_DTLS_SHORT_HEADER,
185
31.1k
                     this->EnableDtlsShortHeader());
186
31.1k
  assert(rv == SECSuccess);
187
188
#ifndef IS_DTLS_FUZZ
189
17.0k
  rv =
190
17.0k
      SSL_OptionSet(fd, SSL_ENABLE_RENEGOTIATION, SSL_RENEGOTIATE_UNRESTRICTED);
191
17.0k
  assert(rv == SECSuccess);
192
193
17.0k
  if (this->SetClientEchConfigs()) {
194
8.63k
    ScopedSECItem echConfigsBin(NSSBase64_DecodeBuffer(
195
8.63k
        nullptr, nullptr, kEchConfigs, sizeof(kEchConfigs)));
196
8.63k
    assert(echConfigsBin);
197
198
8.63k
    rv = SSL_SetClientEchConfigs(fd, echConfigsBin->data, echConfigsBin->len);
199
8.63k
    assert(rv == SECSuccess);
200
8.63k
  }
201
#endif  // IS_DTLS_FUZZ
202
17.0k
}
TlsClient::Config::SetSocketOptions(PRFileDesc*)
Line
Count
Source
92
14.0k
void Config::SetSocketOptions(PRFileDesc* fd) {
93
14.0k
  SECStatus rv = SSL_OptionSet(fd, SSL_ENABLE_EXTENDED_MASTER_SECRET,
94
14.0k
                               this->EnableExtendedMasterSecret());
95
14.0k
  assert(rv == SECSuccess);
96
97
14.0k
  rv = SSL_OptionSet(fd, SSL_REQUIRE_DH_NAMED_GROUPS,
98
14.0k
                     this->RequireDhNamedGroups());
99
14.0k
  assert(rv == SECSuccess);
100
101
14.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_FALSE_START, this->EnableFalseStart());
102
14.0k
  assert(rv == SECSuccess);
103
104
14.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_DEFLATE, this->EnableDeflate());
105
14.0k
  assert(rv == SECSuccess);
106
107
14.0k
  rv = SSL_OptionSet(fd, SSL_CBC_RANDOM_IV, this->CbcRandomIv());
108
14.0k
  assert(rv == SECSuccess);
109
110
14.0k
  rv = SSL_OptionSet(fd, SSL_REQUIRE_SAFE_NEGOTIATION,
111
14.0k
                     this->RequireSafeNegotiation());
112
14.0k
  assert(rv == SECSuccess);
113
114
14.0k
  rv = SSL_OptionSet(fd, SSL_NO_CACHE, this->NoCache());
115
14.0k
  assert(rv == SECSuccess);
116
117
14.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_GREASE, this->EnableGrease());
118
14.0k
  assert(rv == SECSuccess);
119
120
14.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_CH_EXTENSION_PERMUTATION,
121
14.0k
                     this->EnableCHExtensionPermutation());
122
14.0k
  assert(rv == SECSuccess);
123
124
14.0k
  if (this->SetCertificateCompressionAlgorithm()) {
125
7.05k
    rv = SSL_SetCertificateCompressionAlgorithm(fd, kCompressionAlg);
126
7.05k
    assert(rv == SECSuccess);
127
7.05k
  }
128
129
14.0k
  if (this->SetVersionRange()) {
130
9.19k
    rv = SSL_VersionRangeSet(fd, &ssl_version_range_);
131
9.19k
    assert(rv == SECSuccess);
132
9.19k
  }
133
134
14.0k
  if (this->AddExternalPsk()) {
135
7.30k
    ScopedPK11SlotInfo slot(PK11_GetInternalSlot());
136
7.30k
    assert(slot);
137
138
7.30k
    ScopedPK11SymKey key(PK11_KeyGen(slot.get(), CKM_NSS_CHACHA20_POLY1305,
139
7.30k
                                     nullptr, 32, nullptr));
140
7.30k
    assert(key);
141
142
7.30k
    rv = SSL_AddExternalPsk(fd, key.get(), kPskIdentity,
143
7.30k
                            sizeof(kPskIdentity) - 1, this->PskHashType());
144
7.30k
    assert(rv == SECSuccess);
145
7.30k
  }
146
147
14.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_POST_HANDSHAKE_AUTH,
148
14.0k
                     this->EnablePostHandshakeAuth());
149
14.0k
  assert(rv == SECSuccess);
150
151
14.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_0RTT_DATA, this->EnableZeroRtt());
152
14.0k
  assert(rv == SECSuccess);
153
154
14.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_ALPN, this->EnableAlpn());
155
14.0k
  assert(rv == SECSuccess);
156
157
14.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_FALLBACK_SCSV, this->EnableFallbackScsv());
158
14.0k
  assert(rv == SECSuccess);
159
160
14.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_OCSP_STAPLING, this->EnableOcspStapling());
161
14.0k
  assert(rv == SECSuccess);
162
163
14.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_SESSION_TICKETS,
164
14.0k
                     this->EnableSessionTickets());
165
14.0k
  assert(rv == SECSuccess);
166
167
14.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_TLS13_COMPAT_MODE,
168
14.0k
                     this->EnableTls13CompatMode());
169
14.0k
  assert(rv == SECSuccess);
170
171
14.0k
  rv = SSL_OptionSet(fd, SSL_NO_LOCKS, this->NoLocks());
172
14.0k
  assert(rv == SECSuccess);
173
174
14.0k
  rv = SSL_EnableTls13GreaseEch(fd, this->EnableTls13GreaseEch());
175
14.0k
  assert(rv == SECSuccess);
176
177
14.0k
  rv = SSL_SetDtls13VersionWorkaround(fd, this->SetDtls13VersionWorkaround());
178
14.0k
  assert(rv == SECSuccess);
179
180
14.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_DELEGATED_CREDENTIALS,
181
14.0k
                     this->EnableDelegatedCredentials());
182
14.0k
  assert(rv == SECSuccess);
183
184
14.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_DTLS_SHORT_HEADER,
185
14.0k
                     this->EnableDtlsShortHeader());
186
14.0k
  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
14.0k
}
TlsClient::Config::SetSocketOptions(PRFileDesc*)
Line
Count
Source
92
17.0k
void Config::SetSocketOptions(PRFileDesc* fd) {
93
17.0k
  SECStatus rv = SSL_OptionSet(fd, SSL_ENABLE_EXTENDED_MASTER_SECRET,
94
17.0k
                               this->EnableExtendedMasterSecret());
95
17.0k
  assert(rv == SECSuccess);
96
97
17.0k
  rv = SSL_OptionSet(fd, SSL_REQUIRE_DH_NAMED_GROUPS,
98
17.0k
                     this->RequireDhNamedGroups());
99
17.0k
  assert(rv == SECSuccess);
100
101
17.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_FALSE_START, this->EnableFalseStart());
102
17.0k
  assert(rv == SECSuccess);
103
104
17.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_DEFLATE, this->EnableDeflate());
105
17.0k
  assert(rv == SECSuccess);
106
107
17.0k
  rv = SSL_OptionSet(fd, SSL_CBC_RANDOM_IV, this->CbcRandomIv());
108
17.0k
  assert(rv == SECSuccess);
109
110
17.0k
  rv = SSL_OptionSet(fd, SSL_REQUIRE_SAFE_NEGOTIATION,
111
17.0k
                     this->RequireSafeNegotiation());
112
17.0k
  assert(rv == SECSuccess);
113
114
17.0k
  rv = SSL_OptionSet(fd, SSL_NO_CACHE, this->NoCache());
115
17.0k
  assert(rv == SECSuccess);
116
117
17.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_GREASE, this->EnableGrease());
118
17.0k
  assert(rv == SECSuccess);
119
120
17.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_CH_EXTENSION_PERMUTATION,
121
17.0k
                     this->EnableCHExtensionPermutation());
122
17.0k
  assert(rv == SECSuccess);
123
124
17.0k
  if (this->SetCertificateCompressionAlgorithm()) {
125
8.53k
    rv = SSL_SetCertificateCompressionAlgorithm(fd, kCompressionAlg);
126
8.53k
    assert(rv == SECSuccess);
127
8.53k
  }
128
129
17.0k
  if (this->SetVersionRange()) {
130
11.7k
    rv = SSL_VersionRangeSet(fd, &ssl_version_range_);
131
11.7k
    assert(rv == SECSuccess);
132
11.7k
  }
133
134
17.0k
  if (this->AddExternalPsk()) {
135
8.67k
    ScopedPK11SlotInfo slot(PK11_GetInternalSlot());
136
8.67k
    assert(slot);
137
138
8.67k
    ScopedPK11SymKey key(PK11_KeyGen(slot.get(), CKM_NSS_CHACHA20_POLY1305,
139
8.67k
                                     nullptr, 32, nullptr));
140
8.67k
    assert(key);
141
142
8.67k
    rv = SSL_AddExternalPsk(fd, key.get(), kPskIdentity,
143
8.67k
                            sizeof(kPskIdentity) - 1, this->PskHashType());
144
8.67k
    assert(rv == SECSuccess);
145
8.67k
  }
146
147
17.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_POST_HANDSHAKE_AUTH,
148
17.0k
                     this->EnablePostHandshakeAuth());
149
17.0k
  assert(rv == SECSuccess);
150
151
17.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_0RTT_DATA, this->EnableZeroRtt());
152
17.0k
  assert(rv == SECSuccess);
153
154
17.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_ALPN, this->EnableAlpn());
155
17.0k
  assert(rv == SECSuccess);
156
157
17.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_FALLBACK_SCSV, this->EnableFallbackScsv());
158
17.0k
  assert(rv == SECSuccess);
159
160
17.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_OCSP_STAPLING, this->EnableOcspStapling());
161
17.0k
  assert(rv == SECSuccess);
162
163
17.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_SESSION_TICKETS,
164
17.0k
                     this->EnableSessionTickets());
165
17.0k
  assert(rv == SECSuccess);
166
167
17.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_TLS13_COMPAT_MODE,
168
17.0k
                     this->EnableTls13CompatMode());
169
17.0k
  assert(rv == SECSuccess);
170
171
17.0k
  rv = SSL_OptionSet(fd, SSL_NO_LOCKS, this->NoLocks());
172
17.0k
  assert(rv == SECSuccess);
173
174
17.0k
  rv = SSL_EnableTls13GreaseEch(fd, this->EnableTls13GreaseEch());
175
17.0k
  assert(rv == SECSuccess);
176
177
17.0k
  rv = SSL_SetDtls13VersionWorkaround(fd, this->SetDtls13VersionWorkaround());
178
17.0k
  assert(rv == SECSuccess);
179
180
17.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_DELEGATED_CREDENTIALS,
181
17.0k
                     this->EnableDelegatedCredentials());
182
17.0k
  assert(rv == SECSuccess);
183
184
17.0k
  rv = SSL_OptionSet(fd, SSL_ENABLE_DTLS_SHORT_HEADER,
185
17.0k
                     this->EnableDtlsShortHeader());
186
17.0k
  assert(rv == SECSuccess);
187
188
17.0k
#ifndef IS_DTLS_FUZZ
189
17.0k
  rv =
190
17.0k
      SSL_OptionSet(fd, SSL_ENABLE_RENEGOTIATION, SSL_RENEGOTIATE_UNRESTRICTED);
191
17.0k
  assert(rv == SECSuccess);
192
193
17.0k
  if (this->SetClientEchConfigs()) {
194
8.63k
    ScopedSECItem echConfigsBin(NSSBase64_DecodeBuffer(
195
8.63k
        nullptr, nullptr, kEchConfigs, sizeof(kEchConfigs)));
196
8.63k
    assert(echConfigsBin);
197
198
8.63k
    rv = SSL_SetClientEchConfigs(fd, echConfigsBin->data, echConfigsBin->len);
199
    assert(rv == SECSuccess);
200
8.63k
  }
201
17.0k
#endif  // IS_DTLS_FUZZ
202
17.0k
}
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