Skip to content

Commit

Permalink
tls: add parser logic for previous commits related to TLSv1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
henningw committed Aug 17, 2022
1 parent 988b999 commit c73a412
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/modules/tls/tls_config.c
Expand Up @@ -125,6 +125,8 @@ static cfg_option_t methods[] = {
{"TLSv1.1+", .val = TLS_USE_TLSv1_1_PLUS},
{"TLSv1.2", .val = TLS_USE_TLSv1_2},
{"TLSv1.2+", .val = TLS_USE_TLSv1_2_PLUS},
{"TLSv1.3", .val = TLS_USE_TLSv1_3},
{"TLSv1.3+", .val = TLS_USE_TLSv1_3_PLUS},
{0}
};

Expand Down Expand Up @@ -528,6 +530,13 @@ int tls_parse_method(str* method)
return -1;
}
#endif
#if OPENSSL_VERSION_NUMBER < 0x1010100fL
if(opt->val == TLS_USE_TLSv1_3 || opt->val == TLS_USE_TLSv1_3_PLUS) {
LM_ERR("tls v1.3 not supported by this libssl version: %ld\n",
(long)OPENSSL_VERSION_NUMBER);
return -1;
}
#endif

return opt->val;
}
Expand Down

0 comments on commit c73a412

Please sign in to comment.