This commit is contained in:
@@ -603,48 +603,5 @@ struct Host * SignonManager::GetHostInfo()
|
||||
}
|
||||
|
||||
|
||||
int SignonManager::AddUser(char *host, char *userName, char *password)
|
||||
{
|
||||
char checkString[]="test123";
|
||||
char *cryptData = NULL;
|
||||
char *clearData = NULL;
|
||||
char *newdata = NULL;
|
||||
/*
|
||||
// TODO : check if signon preference enabled....
|
||||
if( CheckSignonPref() == FPM_FALSE )
|
||||
{
|
||||
PrintMessage(MESG_ERROR, "\n MCSignonManager : Signon preference is not enabled...");
|
||||
return FPM_FALSE;
|
||||
}
|
||||
|
||||
|
||||
if( EncryptString ("test123", &cryptData) == FPM_FALSE )
|
||||
{
|
||||
PrintMessage(MESG_ERROR, "\n MCSignonManager : fAILED TO EncryptString");
|
||||
return FPM_FALSE;
|
||||
}
|
||||
|
||||
newdata = (char*) malloc(strlen(cryptData) + 1);
|
||||
strcpy(newdata, cryptData);
|
||||
|
||||
if( DecryptString(newdata, &clearData) == FPM_FALSE )
|
||||
{
|
||||
PrintMessage(MESG_ERROR, "\n MCSignonManager : Failed to DecryptString");
|
||||
return FPM_FALSE;
|
||||
}
|
||||
|
||||
printf("\n final decrypted string is : %s ", clearData);
|
||||
|
||||
if( strcmp(checkString, clearData) == 0 )
|
||||
{
|
||||
printf("\n Encryption - decryption test is success ");
|
||||
}
|
||||
else
|
||||
printf("\n Encryption - decryption test is FAILED ");
|
||||
*/
|
||||
return FPM_TRUE;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user