diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-07-31 15:10:21 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-07-31 15:12:00 +0100 |
| commit | f05aa7d8e5a9668b27e43c8bd2718482caa0b59e (patch) | |
| tree | bded1a1ee2ae6370c18a1390eaa9f253d6577f41 /public/tools | |
| parent | 43ace5813967229e03ac46cc00ea8ebf1a607740 (diff) | |
feat: mgmt.oe: openenclave management tool. (wip)
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'public/tools')
| -rw-r--r-- | public/tools/mgmt.oe/.keep | 0 | ||||
| -rw-r--r-- | public/tools/mgmt.oe/mgmt.oe.json | 19 | ||||
| -rw-r--r-- | public/tools/mgmt.oe/src/.keep | 0 | ||||
| -rw-r--r-- | public/tools/mgmt.oe/src/CommandLine.cc | 29 | ||||
| -rw-r--r-- | public/tools/mgmt.oe/vendor/.keep | 0 |
5 files changed, 48 insertions, 0 deletions
diff --git a/public/tools/mgmt.oe/.keep b/public/tools/mgmt.oe/.keep new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/public/tools/mgmt.oe/.keep diff --git a/public/tools/mgmt.oe/mgmt.oe.json b/public/tools/mgmt.oe/mgmt.oe.json new file mode 100644 index 00000000..b4e9d586 --- /dev/null +++ b/public/tools/mgmt.oe/mgmt.oe.json @@ -0,0 +1,19 @@ +{ + "compiler_path": "clang++", + "compiler_std": "c++20", + "headers_path": [ + "./", + "../../../dev/kernel", + "../../../public/frameworks/", + "../../../dev/", + "./" + ], + "sources_path": [], + "output_name": "./dist/mgmt.oe", + "cpp_macros": [ + "kSampleFWVersion=0x0100", + "kSampleFWVersionHighest=0x0100", + "kSampleFWVersionLowest=0x0100", + "__NE_SDK__" + ] +}
\ No newline at end of file diff --git a/public/tools/mgmt.oe/src/.keep b/public/tools/mgmt.oe/src/.keep new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/public/tools/mgmt.oe/src/.keep diff --git a/public/tools/mgmt.oe/src/CommandLine.cc b/public/tools/mgmt.oe/src/CommandLine.cc new file mode 100644 index 00000000..3e8de78b --- /dev/null +++ b/public/tools/mgmt.oe/src/CommandLine.cc @@ -0,0 +1,29 @@ +/* ------------------------------------------- + + Copyright (C) 2025, Amlal El Mahrouss, all rights reserved. + +------------------------------------------- */ + +#include <libSystem/SystemKit/Jail.h> +#include <libSystem/SystemKit/System.h> + +/// @author Amlal El Mahrouss +/// @brief OpenEnclave management tool + +static JAIL* kJailSrv = nullptr; + +SInt32 _NeMain(SInt32 argc, Char* argv[]) { + LIBSYS_UNUSED(argc); + LIBSYS_UNUSED(argv); + + kJailSrv = JailGetCurrent(); + + MUST_PASS(kJailSrv); + + PrintOut(nullptr, "%s", "mgmt.oe - OpenEnclave Management Tool."); + + /// @note JailGetCurrent returns client as nullptr if we're not that client (we'll not be able to access the jail then) + if (kJailSrv->fClient == nullptr) return EXIT_FAILURE; + + return EXIT_FAILURE; +}
\ No newline at end of file diff --git a/public/tools/mgmt.oe/vendor/.keep b/public/tools/mgmt.oe/vendor/.keep new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/public/tools/mgmt.oe/vendor/.keep |
