Skip to content

Commit

Permalink
Merge pull request #464 from zowe/v2.x/feature/tlsDebug
Browse files Browse the repository at this point in the history
Minor debug message change - Mix/Max TLS requested
  • Loading branch information
ifakhrutdinov authored Dec 12, 2024
2 parents 075e2d8 + c49df4c commit 7c36936
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions c/tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,21 +76,19 @@ static int isTLSV13Available(TlsSettings *settings) {
#define TLS_MIN_DEFAULT TLS_V1_2
#define TLS_MAX_DEFAULT TLS_V1_3

static char *TLS_NAMES[5] = {
static char *TLS_NAMES[] = {
"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 < sizeof(TLS_NAMES)/sizeof(TLS_NAMES[0]); 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 +99,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 < sizeof(TLS_NAMES)/sizeof(TLS_NAMES[0]); 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

0 comments on commit 7c36936

Please sign in to comment.