Sync bcrypt/bcrypt winetest with latest wine. Implement all functionality with mbedtls. DSA is my implementation based on libtomcrypt implementation as mbedtls does not support DSA. All failing tests are wine_todo
* [BCRYPT] Split implementations in different files. Add internal header. Add precompiled header. These changes are needed to make bcrypt more wine compatible
* [BCRYPT] Update to latest bcrypt from wine. Add their gnutls implementation with small changes. Add missing function in the other implementations returning STATUS_NOT_IMPLEMENTED. WARNING! gnutls is modified just visually and is n ot compiled locally as we don't have gnutls in ReactOS for a long time and we depend on mbedtls implementation.
* [BCRYPT] Remove forgotten code. Remove hmac BOOL and use hash->flags for hmac
* [BCRYPT] Remove some dead code. Move flag defines in header. Use constant for flag
* [BCRYPT][WINETEST] Update bcrypt wine test to current version. On windows it executes 23114 tests successfully
* [MBEDTLS] Activate MD2 and MD4 hashing algorithms
* [MBEDTLS] Export additional MD functions
* [BCRYPT][WINETEST] Disable not implemented method tests
* [BCRYPT] Remove unneeded headers
* [BCRYPT] Fix some struct variables and add a hash method
* [BCRYPT] Update common crypto implementation
* [MBEDTLS] Expose AES CFB8
* [MBEDTLS] Export simetric encryption/decryption functions
* [BCRYPT] Implement symetric encryption/decryption
* [BCRYPT][WINETEST] Activate symetric encryption/decryption tests. From 22541 Only 3 fail on wine_todo
* [BCRYPT][WINETEST] Disable pbkdf tests. They crash calling function with ULONGLONG parameter
* [MBEDTLS] Export additional functions
* [BCRYPT] Expand private data size
* [BCRYPT] Implement asymetric encryption/decryption. NOTE: DSA is NOT supported by mbedtls, so it is not implemented here
* [MBEDTLS] Disable range check for mbedtls_dhm_calc_secret for ReactOS. It fails tests for key derivation
* [BCRYPT][WINETEST] Enable all tests
* [BCRYPT] Update exports
* [MBEDTLS] Add DSA implementation. It is my implementation based on libtomcrypt and adapted to mbedtls. It is NOT part of mbedtls!
* [BCRYPT] Implement DSA encryption/decryption. Use union for cipher/pk/dh/dsa keys to lower memory used for a key. Lower PRIVATE_DATA_SIZE accordingly.
* [BCRYPT] Fix missed cleanup on error paths. Fixed missed DSA key reinitialization. Change some error codes to STATUS_NO_MEMORY. Minor formatting
* [WINESYNC] Update bcrypt sync status
* [MBEDTLS] Fix double export and move an export for readability
* [BCRYPT] Enable ARC4 (RC4) algorithm
* [BCRYPT] Extend private data size to fit x64
* [WINESYNC] Update WINESYNC.txt to exclude commit hash
---------
Co-authored-by: Justin Miller <justin.miller@reactos.org>
Adds the initial attempt at handling the job ui restriction support. This doesn't protect the OS yet, however it provides everything we need to start implementing that protection.
SetupDiDeleteDeviceInfo always returned FALSE as it used the SP_DEVINFO_DATA structure internally rather than accessing the DeviceInfo structure. Needed for latest XP Nvidia installer.
CORE-20472
ROS has SeRegisterLogonSessionTerminatedRoutine and SeMarkLogonSessionForTerminationNotification that filesystems can use to get notified of a logon session of interest that is about to be terminated as its last refcount is dereferenced.
Though they're both useless because ROS lacks the necessary implementation for this kind of stuff, consequently whoever (and by that I mean FSDs) registered their callback to await for the logon session termination notification, they never get notified like at all.
This patch implements the final bits of this mechanism. Also clarify some comments in the documentation.
- Allow specifying the length of the output `pszName` buffer.
- Reduce the number of character buffers required.
- Simplify parsing the "Layout Display Name" value, of the form:
"@file_path,-resID" . Positive resource ID isn't handled.
- Use `LoadLibraryExW(..., LOAD_LIBRARY_AS_DATAFILE)` for loading
the specified DLL for retrieving its resources.
- Don't leak the loaded DLL when the `LoadStringW()` call succeeds.
- Don't leak the opened registry key when the "Layout Text" value
retrieval fails.
Use case-insensitive matching for comparing the current KLID with
the enumerated ones.
For example on my machine, `GetKeyboardLayoutNameW()` would return
"0000040C" (French AZERTY layout) in capital hex number, while the
registry `HKLM\System\CurrentControlSet\Control\Keyboard Layouts`
subkeys specify the layouts in lowercase hex, which is of course
perfectly valid: the French AZERTY layout would be "0000040c".
Without the fix, there wouldn't be any matching, and as a result,
the correct keyboard layout wouldn't be selected.
- `WCHAR szLayoutId[9]` --> `WCHAR szKLID[KL_NAMELENGTH]`
- Don't use the `LCID` type for unrelated things: namely,
keyboard layout IDs.
- Simplify `CreateKeyboardLayoutList()` a little.
Addendum to commit 6d09885ce4 (PR #4035)
Retrieving the active keyboard layout ID and its name may be considered
as an art in Win32 programming by itself, whenever one is not using the
`GetKeyboardLayoutName()` routine (which only works for the current
thread).
In `SetKeyboardLayoutName()`, after retrieving a candidate KLID (whose
mapping from a HKL isn't trivial and may not always be obtained in a
reliable manner), one needs to check whether this isn't a substituted
layout ID. If so, one needs to retrieve the target ID. Only then it is
safe to look it up into the list of registered Keyboard Layouts (in the
registry), in order to retrieve the corresponding layout name.
In case an error happens and we only get a numerical KLID, just display
this value as the layout name.
----
The original code had problems in the following scenario:
install ReactOS in English (Australia) locale, i.e. LANGID == 0x0C09,
then associate a U.S. keyboard layout (== 0x0409), or something more
exotic like, U.S. Dvorak (right or left handed == 0x00030409 or 0x00040409),
or Arabic (102) AZERTY (== 0x00020401), etc.:
- In any of these cases, the original code would fail because it would
consider a keyboard layout ID == 0x0C09, which doesn't exist at all.
- Using the HKL in the case of Arabic (102) AZERTY to map into a KLID
wouldn't be reliable, because the HKL would be set to: 0x04010C09,
extracting the layout ID is: 0x0401, and a layout substitution may or
may not exist for 0x0401.
Instead, using the Keyboard Layout\Preloads registry key, value "1"
would work, because it would contain an ID that maps (possibly after
substitution) to the correct KLID 0x00020401 for the layout.
Reported-by: Pierce Andjelkovic <pierceandjelkovic@gmail.com>
Add a hack for CMake not being able to properly escape command line
GUID definition on some Unix hosts.
CORE-13277
6b3406e630 causes such build errors
when building ReactOS with RosBE on my Linux system:
```
<command-line>: error: "PROXY_CLSID_IS" redefined [-Werror]
<command-line>: note: this is the location of the previous definition
<command-line>: error: "PROXY_CLSID_IS" redefined [-Werror]
<command-line>: note: this is the location of the previous definition
<command-line>: error: "PROXY_CLSID_IS" redefined [-Werror]
<command-line>: note: this is the location of the previous definition
<command-line>: error: "PROXY_CLSID_IS" redefined [-Werror]
<command-line>: note: this is the location of the previous definition
<command-line>: error: "PROXY_CLSID_IS" redefined [-Werror]
<command-line>: note: this is the location of the previous definition
<command-line>: error: "PROXY_CLSID_IS" redefined [-Werror]
<command-line>: note: this is the location of the previous definition
<command-line>: error: "PROXY_CLSID_IS" redefined [-Werror]
<command-line>: note: this is the location of the previous definition
<command-line>: error: "PROXY_CLSID_IS" redefined [-Werror]
<command-line>: note: this is the location of the previous definition
<command-line>: error: "PROXY_CLSID_IS" redefined [-Werror]
<command-line>: note: this is the location of the previous definition
<command-line>: error: "PROXY_CLSID_IS" redefined [-Werror]
<command-line>: note: this is the location of the previous definition
cc1: error: unrecognized command line option '-Wno-unknown-warning-option' [-Werror]
cc1: all warnings being treated as errors
[5/29] Building C object dll/win32/urlmon/CMakeFiles/urlmon.dir/proxy.dlldata.c.obj
FAILED: dll/win32/urlmon/CMakeFiles/urlmon.dir/proxy.dlldata.c.obj
```
- `InstallReactOS()`: Always reboot at the end of installation, and even
if errors happened, and don't consider as fatal errors any failure to
acquire the shutdown privilege.
- `InstallLiveCD()`: Reboot in case an error happened.
Addendum to commit 0b3a854203 (r29160).
The (now-removed) `TOKEN_QUERY` flag was a bug introduced in commit
949f9a7ff6 (r13370), probably as a copy-pasta error from other similar
lines also introduced in that commit; and this bug still also exists to
this day in wine-11.16.
Import rtworkq.dll from Wine-10.0, required for importing wine's MediaFoundation implementation. Locked behind Windows 8.1 as apps detect for the presence of this DLL.
This is an undocumented WinMM specific message that tells whether the
`KSCATEGORY_AUDIO` devices were installed or removed. wParam and lParam
are not used by this message.
It's needed for #8577 to get notification on default audio output device change.
CORE-12323
Right now nt!SepLogonSessions in ROS is a mere pointer list of _SEP_LOGON_SESSION_REFERENCES structures. !logonsession command of WinDBG expects it to be a hash table, composed as an array of lists though.
Consequently this command doesn't work if you debug ROS, it simply causes the debugger to spam the logger with garbage into an infinite loop.
So in order to fix this, we gotta make this database construct behave as what WinDBG would strictly expect.
CORE-20344
Addendum to commit 6d09885ce4 (PR #4035)
- The `IDC_LOCALETEXT` and `IDC_LAYOUTTEXT` controls don't need to hold
a template string, since it gets unconditionally replaced at runtime.
- Add missing `IDS_LOCALETEXT` and `IDS_LAYOUTTEXT` strings (to be translated!)
in Basque translation file.
- Add the missing horizontal separator in some translations.
- Homogenize the height and length of some elements across translations.
Misc. changes:
- [FMIFS] Fix source file encoding to UTF-8
- [KERNEL32] Fix SAL annotation for BasepMapFile
- [NTUSER] Fix a debug print incorrectly mentioning RtlDosPathNameToNtPathName_U
This fix is similar to the previous in 657f728767 (#5592).
The CDeviceView::RefreshDeviceList destroys the m_RootNode
object and replaces it with a new one while TreeView still
holds a reference to the now-destroyed old one. This makes
event-handlers to be called using the old pointer, which
in turn makes Node in CDeviceView::BuildActionMenuForNode
return an invalid value for CNode::GetNodeType() that hides
the "Add Hardware" option from context menu.
Instead of adding the TreeView root node and then calling RefreshDeviceList,
we can change the order so the root node is always added to the TreeView
after RefreshDeviceList recreated the m_RootNode.
CORE-19770