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

Fix eap tls preload certificate chains for realms #5299

Open
wants to merge 1 commit into
base: v3.2.x
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
4 changes: 2 additions & 2 deletions src/main/tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -4771,7 +4771,7 @@ static int tls_realms_load(fr_tls_server_conf_t *conf)
S_ISDIR(stat_buf.st_mode)) continue;

strcpy(buffer2, buffer);
p = strchr(buffer2, '.'); /* which must be there... */
p = strrchr(buffer2, '.'); /* which must be there... */
if (!p) continue;

/*
Expand All @@ -4780,7 +4780,7 @@ static int tls_realms_load(fr_tls_server_conf_t *conf)
* the chain file.
*/
strcpy(p, ".key");
if (stat(buffer2, &stat_buf) != 0) private_key_file = buffer2;
if (stat(buffer2, &stat_buf) == 0) private_key_file = buffer2;

ctx = tls_init_ctx(conf, 1, buffer, private_key_file);
if (!ctx) goto error;
Expand Down