MCPcopy Create free account
hub / github.com/apache/trafficserver / initialize

Method initialize

src/iocore/net/SSLConfig.cc:342–650  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

340}
341
342void
343SSLConfigParams::initialize()
344{
345 char *serverCertRelativePath = nullptr;
346 char *ssl_server_private_key_path = nullptr;
347 char *CACertRelativePath = nullptr;
348 char *ssl_client_cert_filename = nullptr;
349 char *ssl_client_cert_path = nullptr;
350 char *ssl_client_private_key_filename = nullptr;
351 char *ssl_client_private_key_path = nullptr;
352 char *clientCACertRelativePath = nullptr;
353 char *ssl_server_ca_cert_filename = nullptr;
354 char *ssl_client_ca_cert_filename = nullptr;
355 char *ssl_ocsp_response_path = nullptr;
356
357 cleanup();
358
359 //+++++++++++++++++++++++++ Server part +++++++++++++++++++++++++++++++++
360 verify_depth = 7;
361
362 REC_ReadConfigInt32(clientCertLevel, "proxy.config.ssl.client.certification_level");
363 REC_ReadConfigStringAlloc(cipherSuite, "proxy.config.ssl.server.cipher_suite");
364 REC_ReadConfigStringAlloc(client_cipherSuite, "proxy.config.ssl.client.cipher_suite");
365 REC_ReadConfigStringAlloc(server_tls13_cipher_suites, "proxy.config.ssl.server.TLSv1_3.cipher_suites");
366 REC_ReadConfigStringAlloc(client_tls13_cipher_suites, "proxy.config.ssl.client.TLSv1_3.cipher_suites");
367
368 dhparamsFile = ats_stringdup(RecConfigReadConfigPath("proxy.config.ssl.server.dhparams_file"));
369
370 int option = 0;
371
372 REC_ReadConfigInteger(client_tls_ver_min, "proxy.config.ssl.client.version.min");
373 REC_ReadConfigInteger(client_tls_ver_max, "proxy.config.ssl.client.version.max");
374 if (client_tls_ver_min < 0 || client_tls_ver_max < 0) {
375 REC_ReadConfigInteger(option, "proxy.config.ssl.client.TLSv1");
376 if (!option) {
377 ssl_client_ctx_options |= SSL_OP_NO_TLSv1;
378 } else {
379 // This is disabled by default. It's used if it's enabled.
380 Warning("proxy.config.ssl.client.TLSv1 is deprecated. Use proxy.config.ssl.client.version.min and "
381 "proxy.config.ssl.client.version.max instead.");
382 }
383
384 REC_ReadConfigInteger(option, "proxy.config.ssl.client.TLSv1_1");
385 if (!option) {
386 ssl_client_ctx_options |= SSL_OP_NO_TLSv1_1;
387 } else {
388 // This is disabled by default. It's used if it's enabled.
389 Warning("proxy.config.ssl.client.TLSv1_1 is deprecated. Use proxy.config.ssl.client.version.min and "
390 "proxy.config.ssl.client.version.max instead.");
391 }
392
393 REC_ReadConfigInteger(option, "proxy.config.ssl.client.TLSv1_2");
394 if (!option) {
395 ssl_client_ctx_options |= SSL_OP_NO_TLSv1_2;
396 // This is enabled by default. It's used if it's disabled.
397 Warning("proxy.config.ssl.client.TLSv1_2 is deprecated. Use proxy.config.ssl.client.version.min and "
398 "proxy.config.ssl.client.version.max instead.");
399 }

Callers 2

MachineMethod · 0.45
reconfigureMethod · 0.45

Calls 12

SetServerPolicyMethod · 0.95
getCTXMethod · 0.95
ats_stringdupFunction · 0.85
RecConfigReadConfigPathFunction · 0.85
ats_freeFunction · 0.85
set_paths_helperFunction · 0.85
ats_free_nullFunction · 0.85
cleanupFunction · 0.50
ErrorClass · 0.50

Tested by

no test coverage detected