- when loading a profile, check all variations of <profile>.conf before <profile> itself
git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@1209 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
98d12f1210
commit
6cc4820d5f
|
@ -351,10 +351,6 @@ sc_profile_locate(const char *name)
|
|||
{
|
||||
static char path[1024];
|
||||
|
||||
/* Unchanged name? */
|
||||
if (access(name, R_OK) == 0)
|
||||
return name;
|
||||
|
||||
/* Name with suffix tagged onto it? */
|
||||
snprintf(path, sizeof(path), "%s.%s", name, SC_PKCS15_PROFILE_SUFFIX);
|
||||
if (access(path, R_OK) == 0)
|
||||
|
@ -376,6 +372,10 @@ sc_profile_locate(const char *name)
|
|||
if (access(path, R_OK) == 0)
|
||||
return path;
|
||||
|
||||
/* Unchanged name? */
|
||||
if (access(name, R_OK) == 0)
|
||||
return name;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue