mirror of
https://github.com/strongswan/strongswan.git
synced 2025-10-07 00:01:49 -04:00
swanctl: Concatenate relative certificate paths correctly on Windows
This commit is contained in:
parent
bc9fd3735d
commit
b67069b00c
@ -102,16 +102,18 @@ static void add_file_list_key(vici_req_t *req, char *key, char *value)
|
||||
enumerator = enumerator_create_token(value, ",", " ");
|
||||
while (enumerator->enumerate(enumerator, &token))
|
||||
{
|
||||
if (*token != '/')
|
||||
if (!path_absolute(token))
|
||||
{
|
||||
if (streq(key, "certs"))
|
||||
{
|
||||
snprintf(buf, sizeof(buf), "%s/%s", SWANCTL_X509DIR, token);
|
||||
snprintf(buf, sizeof(buf), "%s%s%s",
|
||||
SWANCTL_X509DIR, DIRECTORY_SEPARATOR, token);
|
||||
token = buf;
|
||||
}
|
||||
if (streq(key, "cacerts"))
|
||||
{
|
||||
snprintf(buf, sizeof(buf), "%s/%s", SWANCTL_X509CADIR, token);
|
||||
snprintf(buf, sizeof(buf), "%s%s%s",
|
||||
SWANCTL_X509CADIR, DIRECTORY_SEPARATOR, token);
|
||||
token = buf;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user