# for TLS
cipher_server_preference = no
+ #
+ # Older TLS versions are deprecated. But for RadSec,
+ # we CAN allow TLS 1.3.
+ #
+ tls_min_version = "1.2"
+ tls_max_version = "1.3"
+
#
# Session resumption / fast reauthentication
# cache.
void tls_global_cleanup(void);
tls_session_t *tls_new_session(TALLOC_CTX *ctx, fr_tls_server_conf_t *conf, REQUEST *request, bool client_cert);
tls_session_t *tls_new_client_session(TALLOC_CTX *ctx, fr_tls_server_conf_t *conf, int fd, VALUE_PAIR **certs);
-fr_tls_server_conf_t *tls_server_conf_parse(CONF_SECTION *cs);
+fr_tls_server_conf_t *tls_server_conf_parse(CONF_SECTION *cs, bool allow_tls13);
fr_tls_server_conf_t *tls_client_conf_parse(CONF_SECTION *cs);
fr_tls_server_conf_t *tls_server_conf_alloc(TALLOC_CTX *ctx);
SSL_CTX *tls_init_ctx(fr_tls_server_conf_t *conf, int client);
bool disable_tlsv1_1;
bool disable_tlsv1_2;
#ifdef TLS1_3_VERSION
- bool tls13_enable_magic;
- bool tls13_send_zero;
+ bool tls13_enable_magic;
+ bool tls13_send_zero;
#endif
+ bool tls13_internal_enable; //!< for radsec
char const *tls_min_version;
char const *tls_max_version;
*/
if (listen_port == 0) listen_port = PW_RADIUS_TLS_PORT;
- this->tls = tls_server_conf_parse(tls);
+ this->tls = tls_server_conf_parse(tls, true);
if (!this->tls) {
return -1;
}
* UNLESS they set the magic / undocumented flag saying
* "please, let me use TLS 1.3".
*/
- if (!conf->tls13_enable_magic) {
+ if (!conf->tls13_internal_enable && !conf->tls13_enable_magic) {
if (min_version >= TLS1_3_VERSION) {
ERROR("tls_min_version '%s' MUST NOT be 1.3, as the standards have not been finalized.",
conf->tls_min_version);
return one - two;
}
-fr_tls_server_conf_t *tls_server_conf_parse(CONF_SECTION *cs)
+fr_tls_server_conf_t *tls_server_conf_parse(CONF_SECTION *cs, bool allow_tls13)
{
fr_tls_server_conf_t *conf;
*/
if (conf->fragment_size < 100) conf->fragment_size = 100;
+ /*
+ * Allow TLS 1.3 for RadSec
+ */
+ conf->tls13_internal_enable = allow_tls13;
+
/*
* Only check for certificate things if we don't have a
* PSK query.
/*
* Initialize configuration mutex
*/
- pthread_mutex_init(&conf->mutex, NULL);
+ pthread_mutex_init(&conf->mutex, NULL);
/*
* Initialize TLS
*/
if (conf->fragment_size < 100) conf->fragment_size = 100;
+ /*
+ * Allow TLS 1.3 for outgoing RadSec connections.
+ */
+ conf->tls13_internal_enable = true;
+
/*
* Initialize TLS
*/
if (!tls_cs)
return NULL;
- tls_conf = tls_server_conf_parse(tls_cs);
+ tls_conf = tls_server_conf_parse(tls_cs, false);
if (!tls_conf)
return NULL;