diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-08-20 10:04:39 +0200 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-08-20 10:04:39 +0200 |
| commit | 01658f0f5ba1fb3e84d61629f15b8c5221bf66dc (patch) | |
| tree | e3a3320fd6f29d063675feb8cf4ba6645e18d65a /dev | |
| parent | f1ac02764430421a0245261811c819fee0673ef4 (diff) | |
+ Fixes and refactors regarding Kernel DLL and other DLLs.
+ Next commit will fix TryLogIn method.
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'dev')
| -rw-r--r-- | dev/CRT/ReadMe.md | 4 | ||||
| -rw-r--r-- | dev/DDK/KernelVersion.c | 10 | ||||
| -rw-r--r-- | dev/DDK/build.json | 33 | ||||
| -rw-r--r-- | dev/DLL/HTTP/build.json | 10 | ||||
| -rw-r--r-- | dev/DLL/OSHS/build.json | 30 | ||||
| -rw-r--r-- | dev/DLL/OSSS/.keepme (renamed from dev/DLL/HTTP/.keepme) | 0 | ||||
| -rw-r--r-- | dev/DLL/OSSS/build.json | 20 | ||||
| -rw-r--r-- | dev/EFS/EncryptFS.hxx | 6 | ||||
| -rw-r--r-- | dev/EFS/ReadMe.md | 5 | ||||
| -rw-r--r-- | dev/EFS/Sources/EncryptBlock.cxx | 14 | ||||
| -rw-r--r-- | dev/EFS/Sources/Key.cxx | 12 | ||||
| -rw-r--r-- | dev/EFS/build.json | 30 | ||||
| -rw-r--r-- | dev/ZKA/Sources/FS/FAT32.cxx | 12 |
13 files changed, 135 insertions, 51 deletions
diff --git a/dev/CRT/ReadMe.md b/dev/CRT/ReadMe.md index 25dc2cb2..a959d6b8 100644 --- a/dev/CRT/ReadMe.md +++ b/dev/CRT/ReadMe.md @@ -1,5 +1,5 @@ # ZKA C++ RunTime
-This is the public interface of ZKA' NDK RunTime, please check ndk.dll instead.
+This is the public interface of ZKA' C++ RunTime.
-###### (c) ZKA Technologies, all rights reserved.
\ No newline at end of file +###### (c) ZKA Technologies, all rights reserved.
diff --git a/dev/DDK/KernelVersion.c b/dev/DDK/KernelVersion.c index 84abc4f7..4b69aa34 100644 --- a/dev/DDK/KernelVersion.c +++ b/dev/DDK/KernelVersion.c @@ -10,12 +10,16 @@ #ifndef cDDKVersionHighest
#define cDDKVersionHighest 1
-#endif // cDDKVersionHighest
+#endif // !cDDKVersionHighest
#ifndef cDDKVersionLowest
#define cDDKVersionLowest 1
-#endif // cDDKVersionLowest
+#endif // !cDDKVersionLowest
+
+#ifndef cDDKVersion
+#define cDDKVersion 1
+#endif // !cDDKVersion
int32_t c_api_version_highest = cDDKVersionHighest;
int32_t c_api_version_least = cDDKVersionLowest;
-int32_t c_api_version = cDDKVersionHighest | cDDKVersionLowest;
\ No newline at end of file +int32_t c_api_version = cDDKVersion;
diff --git a/dev/DDK/build.json b/dev/DDK/build.json index 328165ba..a9a3b895 100644 --- a/dev/DDK/build.json +++ b/dev/DDK/build.json @@ -1,10 +1,23 @@ -{
- "compiler_path": "x86_64-w64-mingw32-gcc",
- "compiler_std": "c++20",
- "headers_path": ["../", "./"],
- "sources_path": ["*.c", "*.cxx", "*.S"],
- "output_name": "ddk.dll",
- "compiler_flags": ["-ffreestanding", "-shared", "-std=c17", "-std=c++20", "-fno-rtti", "-fno-exceptions", " -Wl,--subsystem=17"],
- "cpp_macros": ["__NEWOSKRNL__", "__DDK_AMD64__", "cDDKVersionHighest=1", "cDDKVersionLowest=1"]
- }
-
\ No newline at end of file +{ + "compiler_path": "x86_64-w64-mingw32-gcc", + "compiler_std": "c++20", + "headers_path": ["../", "./"], + "sources_path": ["*.c", "*.cxx", "*.S"], + "output_name": "ddk.dll", + "compiler_flags": [ + "-ffreestanding", + "-shared", + "-std=c17", + "-std=c++20", + "-fno-rtti", + "-fno-exceptions", + " -Wl,--subsystem=17" + ], + "cpp_macros": [ + "__NEWOSKRNL__", + "__DDK_AMD64__", + "cDDKVersionHighest=0x0100", + "cDDKVersionLowest=0x0100", + "cDDKVersion=0x0100" + ] +} diff --git a/dev/DLL/HTTP/build.json b/dev/DLL/HTTP/build.json deleted file mode 100644 index 10470542..00000000 --- a/dev/DLL/HTTP/build.json +++ /dev/null @@ -1,10 +0,0 @@ -{
- "compiler_path": "x86_64-w64-mingw32-g++",
- "compiler_std": "c++20",
- "headers_path": ["../", "./"],
- "sources_path": ["*.cxx"],
- "output_name": "httpsrv.dll",
- "compiler_flags": ["-ffreestanding", "-shared", "-fno-rtti", "-fno-exceptions", " -Wl,--subsystem=17"],
- "cpp_macros": ["__HTTP_AMD64__", "cHTTPVersion=0x0100", "cHTTPVersionHighest=0x0100", "cHTTPVersionLowest=0x0100"]
- }
-
\ No newline at end of file diff --git a/dev/DLL/OSHS/build.json b/dev/DLL/OSHS/build.json index b8d41ae3..a407db54 100644 --- a/dev/DLL/OSHS/build.json +++ b/dev/DLL/OSHS/build.json @@ -1,10 +1,20 @@ -{
- "compiler_path": "x86_64-w64-mingw32-g++",
- "compiler_std": "c++20",
- "headers_path": ["../", "./"],
- "sources_path": ["*.cxx"],
- "output_name": "oshs.dll",
- "compiler_flags": ["-ffreestanding", "-shared", "-fno-rtti", "-fno-exceptions", " -Wl,--subsystem=17"],
- "cpp_macros": ["__OSHS_AMD64__", "cOSHSVersion=0x0100", "cOSHSVersionHighest=0x0100", "cOSHSVersionLowest=0x0100"]
- }
-
\ No newline at end of file +{ + "compiler_path": "x86_64-w64-mingw32-g++", + "compiler_std": "c++20", + "headers_path": ["../", "./"], + "sources_path": ["*.cxx"], + "output_name": "oshs.dll", + "compiler_flags": [ + "-ffreestanding", + "-shared", + "-fno-rtti", + "-fno-exceptions", + " -Wl,--subsystem=17" + ], + "cpp_macros": [ + "__OSHS_AMD64__", + "cOSHSVersion=0x0100", + "cOSHSVersionHighest=0x0100", + "cOSHSVersionLowest=0x0100" + ] +} diff --git a/dev/DLL/HTTP/.keepme b/dev/DLL/OSSS/.keepme index e69de29b..e69de29b 100644 --- a/dev/DLL/HTTP/.keepme +++ b/dev/DLL/OSSS/.keepme diff --git a/dev/DLL/OSSS/build.json b/dev/DLL/OSSS/build.json new file mode 100644 index 00000000..2d804db5 --- /dev/null +++ b/dev/DLL/OSSS/build.json @@ -0,0 +1,20 @@ +{ + "compiler_path": "x86_64-w64-mingw32-g++", + "compiler_std": "c++20", + "headers_path": ["../", "./"], + "sources_path": ["*.cxx"], + "output_name": "osss.dll", + "compiler_flags": [ + "-ffreestanding", + "-shared", + "-fno-rtti", + "-fno-exceptions", + " -Wl,--subsystem=17" + ], + "cpp_macros": [ + "__OSSS_AMD64__", + "cOSSSVersion=0x0100", + "cOSSSVersionHighest=0x0100", + "cOSSSVersionLowest=0x0100" + ] +} diff --git a/dev/EFS/EncryptFS.hxx b/dev/EFS/EncryptFS.hxx index 2ed382e3..4348027b 100644 --- a/dev/EFS/EncryptFS.hxx +++ b/dev/EFS/EncryptFS.hxx @@ -14,9 +14,3 @@ #pragma once
#include <FSKit/NewFS.hxx>
-
-/// @brief EncryptFS NewFS extension for data protection.
-
-#define EFSKIT_VERSION 0x0100
-
-struct EFS_ENCRYPT_BLOCK;
diff --git a/dev/EFS/ReadMe.md b/dev/EFS/ReadMe.md new file mode 100644 index 00000000..ba9de32f --- /dev/null +++ b/dev/EFS/ReadMe.md @@ -0,0 +1,5 @@ +# ZKA Encrypted File System + +This is the ZKA's Encrypted file system DLL. + +###### (c) ZKA Technologies, all rights reserved. diff --git a/dev/EFS/Sources/EncryptBlock.cxx b/dev/EFS/Sources/EncryptBlock.cxx new file mode 100644 index 00000000..09b8c0d9 --- /dev/null +++ b/dev/EFS/Sources/EncryptBlock.cxx @@ -0,0 +1,14 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies. + +------------------------------------------- */ + +#include <cstddef> +#include <cstdint> + +enum +{ + eEFSFlagEncrypted = 0x3f, + eEFSFlagEncryptedEPM = 0xf3, +}; diff --git a/dev/EFS/Sources/Key.cxx b/dev/EFS/Sources/Key.cxx new file mode 100644 index 00000000..457ce1b8 --- /dev/null +++ b/dev/EFS/Sources/Key.cxx @@ -0,0 +1,12 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies. + +------------------------------------------- */ + +#include <new> +#include <cstddef> +#include <cstdint> + +typedef int32_t efs_encrypt_token_t; +typedef void* efs_encrypted_blob_t; diff --git a/dev/EFS/build.json b/dev/EFS/build.json index 560f6716..3c611a95 100644 --- a/dev/EFS/build.json +++ b/dev/EFS/build.json @@ -1,10 +1,20 @@ -{
- "compiler_path": "x86_64-w64-mingw32-g++",
- "compiler_std": "c++20",
- "headers_path": ["../", "./"],
- "sources_path": ["*.cxx"],
- "output_name": "encryptfs.dll",
- "compiler_flags": ["-ffreestanding", "-shared", "-fno-rtti", "-fno-exceptions", " -Wl,--subsystem=17"],
- "cpp_macros": ["__EFS_AMD64__", "cEFSVersion=0x0100", "cEFSVersionHighest=0x0100", "cEFSVersionLowest=0x0100"]
- }
-
\ No newline at end of file +{ + "compiler_path": "x86_64-w64-mingw32-g++", + "compiler_std": "c++20", + "headers_path": ["../", "./"], + "sources_path": ["Sources/*.cxx"], + "output_name": "encryptfs.dll", + "compiler_flags": [ + "-ffreestanding", + "-shared", + "-fno-rtti", + "-fno-exceptions", + " -Wl,--subsystem=17" + ], + "cpp_macros": [ + "__EFS_AMD64__", + "cEFSVersion=0x0100", + "cEFSVersionHighest=0x0100", + "cEFSVersionLowest=0x0100" + ] +} diff --git a/dev/ZKA/Sources/FS/FAT32.cxx b/dev/ZKA/Sources/FS/FAT32.cxx new file mode 100644 index 00000000..1f5e194b --- /dev/null +++ b/dev/ZKA/Sources/FS/FAT32.cxx @@ -0,0 +1,12 @@ +/* ------------------------------------------- + + Copyright ZKA Technologies. + +------------------------------------------- */ + +#ifdef __FSKIT_INCLUDES_FAT32__ + +#include <FirmwareKit/GPT.hxx> +#include <FirmwareKit/EPM.hxx> + +#endif // ifdef __FSKIT_INCLUDES_FAT32__ |
