2010-10-17 15:01:46 +00:00
|
|
|
/*
|
|
|
|
* COPYRIGHT: See COPYING in the top level directory
|
|
|
|
* PROJECT: ReactOS system libraries
|
|
|
|
* FILE: dlls/win32/advapi32/misc/efs.c
|
|
|
|
* PURPOSE: Encrypted File System support
|
|
|
|
* PROGRAMMER: Christoph_vW
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <advapi32.h>
|
|
|
|
|
2014-01-20 13:16:06 +00:00
|
|
|
#include <winefs.h>
|
|
|
|
|
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(advapi);
|
2010-10-17 15:01:46 +00:00
|
|
|
|
2011-02-12 20:23:16 +00:00
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
DWORD WINAPI
|
|
|
|
AddUsersToEncryptedFile(LPCWSTR lpcwstr,
|
|
|
|
PENCRYPTION_CERTIFICATE_LIST pencryption_certificate_list)
|
|
|
|
{
|
|
|
|
FIXME("%s() not implemented!\n", __FUNCTION__);
|
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-10-17 15:01:46 +00:00
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
|
|
|
BOOL WINAPI
|
2011-02-12 20:23:16 +00:00
|
|
|
DecryptFileA(LPCSTR lpFileName,
|
|
|
|
DWORD dwReserved)
|
2010-10-17 15:01:46 +00:00
|
|
|
{
|
|
|
|
UNICODE_STRING FileName;
|
|
|
|
BOOL ret;
|
|
|
|
|
2012-07-12 19:48:30 +00:00
|
|
|
if (!RtlCreateUnicodeStringFromAsciiz(&FileName, lpFileName))
|
2010-10-17 15:01:46 +00:00
|
|
|
{
|
2012-07-12 19:48:30 +00:00
|
|
|
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
2010-10-17 15:01:46 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = DecryptFileW(FileName.Buffer, dwReserved);
|
|
|
|
|
|
|
|
if (FileName.Buffer != NULL)
|
|
|
|
RtlFreeUnicodeString(&FileName);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
2011-02-12 20:23:16 +00:00
|
|
|
BOOL WINAPI
|
|
|
|
DecryptFileW(LPCWSTR lpFileName,
|
|
|
|
DWORD dwReserved)
|
2010-10-17 15:01:46 +00:00
|
|
|
{
|
|
|
|
FIXME("%s(%S) not implemented!\n", __FUNCTION__, lpFileName);
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
|
|
|
BOOL WINAPI
|
|
|
|
EncryptFileA(LPCSTR lpFileName)
|
|
|
|
{
|
|
|
|
UNICODE_STRING FileName;
|
|
|
|
BOOL ret;
|
|
|
|
|
2012-07-12 19:48:30 +00:00
|
|
|
if (!RtlCreateUnicodeStringFromAsciiz(&FileName, lpFileName))
|
2010-10-17 15:01:46 +00:00
|
|
|
{
|
2012-07-12 19:48:30 +00:00
|
|
|
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
2010-10-17 15:01:46 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = EncryptFileW(FileName.Buffer);
|
|
|
|
|
|
|
|
if (FileName.Buffer != NULL)
|
|
|
|
RtlFreeUnicodeString(&FileName);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
BOOL WINAPI
|
|
|
|
EncryptFileW(LPCWSTR lpFileName)
|
|
|
|
{
|
|
|
|
FIXME("%s() not implemented!\n", __FUNCTION__);
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2011-02-12 20:23:16 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
BOOL WINAPI
|
|
|
|
EncryptionDisable(LPCWSTR DirPath,
|
|
|
|
BOOL Disable)
|
|
|
|
{
|
|
|
|
FIXME("%s() not implemented!\n", __FUNCTION__);
|
|
|
|
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @implemented
|
|
|
|
*/
|
|
|
|
BOOL WINAPI
|
|
|
|
FileEncryptionStatusA(LPCSTR lpFileName,
|
|
|
|
LPDWORD lpStatus)
|
|
|
|
{
|
|
|
|
UNICODE_STRING FileName;
|
|
|
|
BOOL ret = FALSE;
|
|
|
|
|
|
|
|
TRACE("(%s, %p)\n", lpFileName, lpStatus);
|
|
|
|
|
|
|
|
FileName.Buffer = NULL;
|
|
|
|
|
2012-07-12 19:48:30 +00:00
|
|
|
if (!RtlCreateUnicodeStringFromAsciiz(&FileName, lpFileName))
|
2011-02-12 20:23:16 +00:00
|
|
|
{
|
2012-07-12 19:48:30 +00:00
|
|
|
SetLastError(ERROR_NOT_ENOUGH_MEMORY);
|
2011-02-12 20:23:16 +00:00
|
|
|
goto cleanup;
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = FileEncryptionStatusW(FileName.Buffer, lpStatus);
|
|
|
|
|
|
|
|
cleanup:
|
|
|
|
if (FileName.Buffer != NULL)
|
|
|
|
RtlFreeUnicodeString(&FileName);
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
BOOL WINAPI
|
|
|
|
FileEncryptionStatusW(LPCWSTR lpFileName,
|
|
|
|
LPDWORD lpStatus)
|
|
|
|
{
|
|
|
|
FIXME("%s(%S) not implemented!\n", __FUNCTION__, lpFileName);
|
|
|
|
|
|
|
|
if (!lpStatus)
|
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
*lpStatus = FILE_SYSTEM_NOT_SUPPORT;
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
VOID WINAPI
|
|
|
|
FreeEncryptionCertificateHashList(PENCRYPTION_CERTIFICATE_HASH_LIST pencryption_certificate_hash_list)
|
|
|
|
{
|
|
|
|
FIXME("%s() not implemented!\n", __FUNCTION__);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
DWORD WINAPI
|
|
|
|
QueryRecoveryAgentsOnEncryptedFile(LPCWSTR lpctstr,
|
|
|
|
PENCRYPTION_CERTIFICATE_HASH_LIST* pencryption_certificate_hash_list)
|
|
|
|
{
|
|
|
|
FIXME("%s() not implemented!\n", __FUNCTION__);
|
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
DWORD WINAPI
|
|
|
|
QueryUsersOnEncryptedFile(LPCWSTR lpctstr,
|
|
|
|
PENCRYPTION_CERTIFICATE_HASH_LIST* pencryption_certificate_hash_list)
|
|
|
|
{
|
|
|
|
FIXME("%s() not implemented!\n", __FUNCTION__);
|
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* @unimplemented
|
|
|
|
*/
|
|
|
|
DWORD WINAPI
|
|
|
|
RemoveUsersFromEncryptedFile(LPCWSTR lpcwstr,
|
|
|
|
PENCRYPTION_CERTIFICATE_HASH_LIST pencryption_certificate_hash_list)
|
|
|
|
{
|
|
|
|
FIXME("%s() not implemented!\n", __FUNCTION__);
|
|
|
|
return ERROR_CALL_NOT_IMPLEMENTED;
|
|
|
|
}
|
|
|
|
|
2010-10-17 15:01:46 +00:00
|
|
|
/* EOF */
|