dxd - dynax driver framework 3.0.1d223
cross platform open source driver development framework
Loading...
Searching...
No Matches
sec.h File Reference
#include <Security/Security.h>
#include <chrono>
#include <cstdlib>
#include <ctime>
#include <iostream>
#include <thread>
Include dependency graph for sec.h:
This graph shows which files directly or indirectly include this file:

Namespaces

namespace  sec
 sec - security namespace

Macros

#define __dx_pass_sec(fatal, test, ...)
#define dx_pass_sec(test, ...)
#define dx_pass_sec_fatal   dx_pass_sec

Functions

void sec::burn () noexcept
 without enforcement a failed check reports and ends the operation, nothing else

Macro Definition Documentation

◆ __dx_pass_sec

#define __dx_pass_sec ( fatal,
test,
... )
Value:
{\
dx::os_result __dx_test_status=(test);\
if (dx::os_error(__dx_test_status)){\
if constexpr(fatal)\
dx::halt();\
throw dx::exception(\
DX_STRINGIFY(test),\
__dx_test_status,\
cf::string(::SecCopyErrorMessageString(__dx_test_status, nullptr)),\
__FILE__, __LINE__,\
##__VA_ARGS__);}}
a throw's whole diagnostic: the OS result, where it was raised (frame, file, line),...
Definition dx_exception.h:186
#define DX_STRINGIFY(...)
Definition dx_macros.h:34
type< const char * > string
Definition cf_string.h:134
bool os_error(os_result result) noexcept
Definition macOS/dx_platform.h:205
::IOReturn os_result
defining platform abstract type os_result for IOKit driver
Definition driverkit/dxd_platform.h:49
void burn() noexcept
without enforcement a failed check reports and ends the operation, nothing else
Definition sec.h:59
#define __PRETTY_FUNCTION__
mock compiler idiosyncrasies
Definition windows/dx_platform.h:50

a failed security call throws, naming the call, its status and the system's own message; the fatal form lights the tamper response first - both spellings end the operation the same way, so a call site reads alike either way

◆ dx_pass_sec

#define dx_pass_sec ( test,
... )
Value:
__dx_pass_sec(false, test, ##__VA_ARGS__)
#define __dx_pass_sec(fatal, test,...)
Definition sec.h:65

◆ dx_pass_sec_fatal

#define dx_pass_sec_fatal   dx_pass_sec

(c) copyright 2009 dynamic acoustics e.U. generated on

a closed source license may be obtained by requesting a written permission from dynamic acoustics e.U.
however - governmental use generally and military use especially is strictly prohibited though.