Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS-4263: keyblock variable configurable via records.config #1008

Merged
merged 1 commit into from Sep 12, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions iocore/net/SSLUtils.cc
Expand Up @@ -2055,9 +2055,12 @@ SSLParseCertificateConfiguration(const SSLConfigParams *params, SSLCertLookup *l

// load the global ticket key for later use
REC_ReadConfigStringAlloc(ticket_key_filename, "proxy.config.ssl.server.ticket_key.filename");
ats_scoped_str ticket_key_path(Layout::relative_to(params->serverCertPathOnly, ticket_key_filename));
global_default_keyblock = ssl_create_ticket_keyblock(ticket_key_path); // this function just returns a keyblock

if (ticket_key_filename != NULL) {
ats_scoped_str ticket_key_path(Layout::relative_to(params->serverCertPathOnly, ticket_key_filename));
global_default_keyblock = ssl_create_ticket_keyblock(ticket_key_path); // this function just returns a keyblock
} else {
global_default_keyblock = ssl_create_ticket_keyblock(NULL); // this function just returns a keyblock
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please clang-format. All blocks must be enclosed in { }.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just did. Sorry I keep forgetting

}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A newline before and after this if/else would improve the readability.

Note("loading SSL certificate configuration from %s", params->configFilePath);

if (params->configFilePath) {
Expand Down
2 changes: 1 addition & 1 deletion mgmt/RecordsConfig.cc
Expand Up @@ -1243,7 +1243,7 @@ static const RecordElement RecordsConfig[] =
,
{RECT_CONFIG, "proxy.config.ssl.server.multicert.exit_on_load_fail", RECD_INT, "0", RECU_RESTART_TS, RR_NULL, RECC_NULL, "[0-1]", RECA_NULL}
,
{RECT_CONFIG, "proxy.config.ssl.server.ticket_key.filename", RECD_STRING, "ssl_ticket.key", RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
{RECT_CONFIG, "proxy.config.ssl.server.ticket_key.filename", RECD_STRING, NULL, RECU_DYNAMIC, RR_NULL, RECC_NULL, NULL, RECA_NULL}
,
{RECT_CONFIG, "proxy.config.ssl.server.private_key.path", RECD_STRING, TS_BUILD_SYSCONFDIR, RECU_RESTART_TS, RR_NULL, RECC_NULL, NULL, RECA_NULL}
,
Expand Down