r= relyea
 Bug 446592 -  Changing a token password with a PIN reader


git-svn-id: svn://10.0.0.236/trunk@257964 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
rrelyea%redhat.com 2009-08-06 17:29:45 +00:00
parent e6d24416a6
commit 502c17c124

View File

@ -483,10 +483,17 @@ PK11_ChangePW(PK11SlotInfo *slot, const char *oldpw, const char *newpw)
int oldLen;
CK_SESSION_HANDLE rwsession;
if (newpw == NULL) newpw = "";
if (oldpw == NULL) oldpw = "";
newLen = PORT_Strlen(newpw);
oldLen = PORT_Strlen(oldpw);
/* use NULL values to trigger the protected authentication path */
if (slot->protectedAuthPath) {
if (newpw == NULL) newLen = 0;
if (oldpw == NULL) oldLen = 0;
} else {
if (newpw == NULL) newpw = "";
if (oldpw == NULL) oldpw = "";
newLen = PORT_Strlen(newpw);
oldLen = PORT_Strlen(oldpw);
}
/* get a rwsession */
rwsession = PK11_GetRWSession(slot);