This commit is contained in:
Manohar
2006-03-06 09:54:36 +00:00
parent d01ef968e0
commit 0bc1f679e4
5 changed files with 78 additions and 83 deletions

View File

@@ -331,6 +331,7 @@ int CryptManager::CryptPK11EncryptString(char *clearData, int clearDataLen, char
{
// since we have specified password callback function , we won't come here...
PrintMessage(MESG_ERROR, "\n CryptPK11EncryptString : PK11_Authenticate failed, possibly master password is wrong");
(*PK11FreeSlot) (slot);
return FPM_MASTERPASSWORD_WRONG;
}
@@ -348,6 +349,7 @@ int CryptManager::CryptPK11EncryptString(char *clearData, int clearDataLen, char
if (status != SECSuccess)
{
PrintMessage(MESG_ERROR, "\n CryptPK11EncryptString : PK11SDR_Encrypt failed ...");
(*PK11FreeSlot) (slot);
return FPM_FALSE;
}
@@ -355,6 +357,7 @@ int CryptManager::CryptPK11EncryptString(char *clearData, int clearDataLen, char
*cryptData = (char*)reply.data;
*cryptDataLen = reply.len;
(*PK11FreeSlot) (slot);
return FPM_TRUE;
}
@@ -396,6 +399,7 @@ int CryptManager::CryptPK11DecryptString(char *decodeData, int decodeLen, char *
{
// since we have specified password callback function , we won't come here...
PrintMessage(MESG_ERROR, "\n PK11_Authenticate failed, Probably master password is wrong");
(*PK11FreeSlot) (slot);
return FPM_MASTERPASSWORD_WRONG;
}
@@ -414,6 +418,7 @@ int CryptManager::CryptPK11DecryptString(char *decodeData, int decodeLen, char *
if (status != SECSuccess)
{
PrintMessage(MESG_ERROR, "\n PK11SDR_Decrypt failed ...");
(*PK11FreeSlot) (slot);
return FPM_FALSE;
}