fix pkcs11 access with multiple PINs
Thanks to Roman Himmes for the patch http://www.opensc-project.org/pipermail/opensc-devel/2009-September/012426.html git-svn-id: https://www.opensc-project.org/svnp/opensc/trunk@3741 c6295689-39f2-0310-b995-f0e70906c6a9
This commit is contained in:
parent
2763c08d09
commit
4439f4d3a2
@ -264,6 +264,10 @@ sc_keycache_set_pin_name(const sc_path_t *path, int ref, int name)
|
|||||||
s = new_entry(path, SC_AC_CHV, ref);
|
s = new_entry(path, SC_AC_CHV, ref);
|
||||||
if (s == NULL)
|
if (s == NULL)
|
||||||
return SC_ERROR_OUT_OF_MEMORY;
|
return SC_ERROR_OUT_OF_MEMORY;
|
||||||
|
|
||||||
|
s->len = sc_keycache_get_key(path, SC_AC_CHV, -1, s->value, MAX_SECRET);
|
||||||
|
if(s->len < 0)
|
||||||
|
return SC_ERROR_OBJECT_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the pin name */
|
/* Set the pin name */
|
||||||
|
Loading…
Reference in New Issue
Block a user