9dfa703c39
api: header: add C++ enum manipulation operators
...
C++ doesn't have bitwise operators on enums by default. Rather than
reinventing the wheel, we use an undocumented DEFINE_ENUM_FLAG_OPERATORS
macro from Windows SDK to implement the enum operators.
Signed-off-by: Simon Rozman <simon@rozman.si>
2022-03-30 09:56:59 +02:00
f394d011c3
driver: PEER_UPDATE is supposed to be UPDATE_ONLY
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-10-19 12:33:07 -06:00
d583e4ab3c
api: main: avoid excessive function cast
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-10-15 00:44:18 +00:00
30a2817d91
api: header: fix typo
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-10-14 17:15:40 -06:00
aa20eecef9
api: use proper instance id bounds
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-10-14 06:49:29 +00:00
780404cd2c
api: adapter: handle cases explicitly in dev query callback
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-10-14 05:27:13 +00:00
c3874d1da5
downlevelshim: remove in preparation for full WHQL
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-10-13 17:29:10 +00:00
a409cc9e65
api: driver: don't allocate for instance ID
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-10-12 17:57:10 +00:00
fa6b6dfc78
api: unify remaining poll loop forms
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-10-11 16:12:09 +00:00
6f51e33644
api: adapter: ensure file handle opens on win7
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-10-11 16:12:09 +00:00
d59103ba07
api: adapter: open devinst after arrival and skip stub on win8
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-10-11 16:12:09 +00:00
f779da4e88
api: adapter: replace INF Include/Needs hack with stub device
...
Apparently breaking the guarantee of "Universal INF"s receives the big
tsk tsk, so this commit is yet another way to set SuggestedInstanceId.
We create an SwDevice, with DEVPKEY_Device_ClassGuid set to
GUID_DEVCLASS_NET and an empty HWID, and then create the software regkey
and add the keys we need. We then destroy the SwDevice, and recreate a
new one with the same instance ID, this time with the proper parameters.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-10-11 16:12:09 +00:00
860a0c4480
api: adapter: cleanup ROOT\NET enumerated devices on DLL load
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-10-11 16:12:09 +00:00
5030636183
api: migrate to swdevice and rework entire api
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-10-06 18:05:46 +00:00
4ad19bf3dc
api: adapter: set suggested instance ID using INF instead of ourselves
...
This might allow us to more successfully move to using SwDevice.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-10-06 05:16:14 +00:00
c8ee696db5
api: adapter: get rid of registry polling on Win8+
...
Wait for the device to come up as enabled instead using the proper Win8+
API. Fall back to polling for Win7.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-10-06 05:16:14 +00:00
b9fc0f6665
api: logger: remove function prefixes
...
The strings are already unique, so prefixing function names adds
nothing.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-10-06 05:16:14 +00:00
12993b1364
api: adapter: treat reboot required as real error
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-10-06 05:16:14 +00:00
88689f5255
api: adapter: check for errors before waiting on reg keys
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-10-06 05:16:14 +00:00
c2679dac19
api: adapter: remove deadgwdetect setting
...
It's unclear whether this registry key is still being respected.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-10-06 05:16:14 +00:00
8d7d500451
api: adapter: cleanup wintrust shim if install fails
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-09-28 00:47:10 +00:00
07009b0ae6
api: support MinGW in distributed header
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-09-16 12:02:29 +00:00
ccbad92fd5
props: unify import .lib of DLLs
...
This moves downlevelshim.lib and those .lib from any future DLLs in this
repo to the matching IntDir.
Signed-off-by: Simon Rozman <simon@rozman.si>
2021-08-10 10:14:48 +02:00
64ea99302a
driver: logging: pass timestamp back to userspace
...
It turns out the precision is very useful for diagnosing weird errors.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-08-08 22:57:27 +02:00
3b01a5096b
api: rundll32: make empty string if no instance id
...
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-08-08 22:57:27 +02:00
3e70808fa1
api: incorporate new win7 code signing technique
...
https://git.zx2c4.com/downlevel-driver-enabler/about/
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-08-02 20:36:37 +02:00
f61c065ee2
api: remove Authenticode support
...
These are no longer supported by the CAs.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-08-02 20:36:36 +02:00
9dba693f78
Introduce WireGuardNT
...
Co-authored-by: Simon Rozman <simon@rozman.si>
Signed-off-by: Simon Rozman <simon@rozman.si>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
2021-08-02 20:36:36 +02:00