Author: ekohl Date: Sat Feb 12 20:23:16 2011 New Revision: 50675
URL: http://svn.reactos.org/svn/reactos?rev=50675&view=rev Log: [ADVAPI32] Move file encryption functions from crypt/crypt.c to misc/efs.c.
Modified: trunk/reactos/dll/win32/advapi32/crypt/crypt.c trunk/reactos/dll/win32/advapi32/misc/efs.c
Modified: trunk/reactos/dll/win32/advapi32/crypt/crypt.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/crypt/cr... ============================================================================== --- trunk/reactos/dll/win32/advapi32/crypt/crypt.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/crypt/crypt.c [iso-8859-1] Sat Feb 12 20:23:16 2011 @@ -2217,124 +2217,3 @@
return result; } - -/* - * @unimplemented - */ -DWORD WINAPI AddUsersToEncryptedFile ( - LPCWSTR lpcwstr, - PENCRYPTION_CERTIFICATE_LIST pencryption_certificate_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; -} - -/* - * @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; -} - - -/* - * @implemented - */ -BOOL WINAPI FileEncryptionStatusA ( - LPCSTR lpFileName, - LPDWORD lpStatus - ) -{ - UNICODE_STRING FileName; - NTSTATUS Status; - BOOL ret = FALSE; - - TRACE("(%s, %p)\n", lpFileName, lpStatus); - - FileName.Buffer = NULL; - - Status = RtlCreateUnicodeStringFromAsciiz(&FileName, lpFileName); - if (!NT_SUCCESS(Status)) - { - SetLastError(RtlNtStatusToDosError(Status)); - goto cleanup; - } - ret = FileEncryptionStatusW(FileName.Buffer, lpStatus); - -cleanup: - if (FileName.Buffer != NULL) - RtlFreeUnicodeString(&FileName); - return ret; -} - -/* - * @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 - */ -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 - */ -BOOL WINAPI EncryptionDisable( - LPCWSTR DirPath, - BOOL Disable - ) -{ - FIXME("%s() not implemented!\n", __FUNCTION__); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; -} -
Modified: trunk/reactos/dll/win32/advapi32/misc/efs.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/advapi32/misc/efs... ============================================================================== --- trunk/reactos/dll/win32/advapi32/misc/efs.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/advapi32/misc/efs.c [iso-8859-1] Sat Feb 12 20:23:16 2011 @@ -13,10 +13,23 @@
/* + * @unimplemented + */ +DWORD WINAPI +AddUsersToEncryptedFile(LPCWSTR lpcwstr, + PENCRYPTION_CERTIFICATE_LIST pencryption_certificate_list) +{ + FIXME("%s() not implemented!\n", __FUNCTION__); + return ERROR_CALL_NOT_IMPLEMENTED; +} + + +/* * @implemented */ BOOL WINAPI -DecryptFileA(LPCSTR lpFileName, DWORD dwReserved) +DecryptFileA(LPCSTR lpFileName, + DWORD dwReserved) { UNICODE_STRING FileName; NTSTATUS Status; @@ -40,7 +53,9 @@ /* * @unimplemented */ -BOOL WINAPI DecryptFileW(LPCWSTR lpFileName, DWORD dwReserved) +BOOL WINAPI +DecryptFileW(LPCWSTR lpFileName, + DWORD dwReserved) { FIXME("%s(%S) not implemented!\n", __FUNCTION__, lpFileName); return TRUE; @@ -82,4 +97,113 @@ return TRUE; }
+ +/* + * @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; + NTSTATUS Status; + BOOL ret = FALSE; + + TRACE("(%s, %p)\n", lpFileName, lpStatus); + + FileName.Buffer = NULL; + + Status = RtlCreateUnicodeStringFromAsciiz(&FileName, lpFileName); + if (!NT_SUCCESS(Status)) + { + SetLastError(RtlNtStatusToDosError(Status)); + 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; +} + /* EOF */