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

Minor debug message change - Mix/Max TLS requested #464

Open
wants to merge 2 commits into
base: v3.x/staging
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions c/tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,20 @@ static int isTLSV13Available(TlsSettings *settings) {
#define TLS_MIN_DEFAULT TLS_V1_2
#define TLS_MAX_DEFAULT TLS_V1_3

static char *TLS_NAMES[5] = {
#define TLS_NAMES_COUNT 5
static char *TLS_NAMES[TLS_NAMES_COUNT] = {
"invalid",
"TLSv1.0",
"TLSv1.1",
"TLSv1.2",
"TLSv1.3"
};

#define TLS_NAMES_LENGTH 5

static int getTlsMax(TlsSettings *settings) {
if (settings->maxTls != NULL) {
for (int i = 0; i < TLS_NAMES_LENGTH; i++) {
for (int i = 0; i < TLS_NAMES_COUNT; i++) {
if (!strcmp(settings->maxTls, TLS_NAMES[i])) {
zowelog(NULL, LOG_COMP_HTTPSERVER, ZOWE_LOG_DEBUG, "Min TLS requested=%d\n",i);
zowelog(NULL, LOG_COMP_HTTPSERVER, ZOWE_LOG_DEBUG, "Min TLS requested=%s\n", TLS_NAMES[i]);
return i;
}
}
Expand All @@ -101,9 +100,9 @@ static int getTlsMax(TlsSettings *settings) {

static int getTlsMin(TlsSettings *settings) {
if (settings->minTls != NULL) {
for (int i = 0; i < TLS_NAMES_LENGTH; i++) {
for (int i = 0; i < TLS_NAMES_COUNT; i++) {
if (!strcmp(settings->minTls, TLS_NAMES[i])) {
zowelog(NULL, LOG_COMP_HTTPSERVER, ZOWE_LOG_DEBUG, "Max TLS requested=%d\n",i);
zowelog(NULL, LOG_COMP_HTTPSERVER, ZOWE_LOG_DEBUG, "Max TLS requested=%s\n", TLS_NAMES[i]);
return i;
}
}
Expand Down
Loading