Skip to content

Commit

Permalink
Merge branch 'v3.x/staging' into v3.x/extractUpdate
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeNemo authored Dec 18, 2024
2 parents 96ed69b + 7c36936 commit 75b56d8
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 75b56d8

Please sign in to comment.