#include <security_utilities/machserver.h>
#include <security_utilities/powerwatch.h>
#include <security_utilities/ccaudit.h>
-#include <security_utilities/threading.h>
#include <security_cdsa_client/cssmclient.h>
#include <security_cdsa_client/cspclient.h>
#include <security_utilities/devrandom.h>
#include "database.h"
#include "localdatabase.h"
#include "kcdatabase.h"
-#include "authority.h"
-#include "AuthorizationEngine.h"
#include <map>
-//
-// The authority itself. You will usually only have one of these.
-//
-class Authority : public Authorization::Engine {
-public:
- Authority(const char *configFile);
- ~Authority();
-};
-
//
// The server object itself. This is the "go to" object for anyone who wants
// to access the server's global state. It runs the show.
public MachPlusPlus::MachServer,
public UniformRandomBlobs<DevRandomGenerator> {
public:
- Server(Authority &myAuthority, CodeSignatures &signatures, const char *bootstrapName);
+ Server(CodeSignatures &signatures, const char *bootstrapName);
~Server();
// run the server until it shuts down
//
// publicly accessible components of the active server
//
- static Authority &authority() { return active().mAuthority; }
static CodeSignatures &codeSignatures() { return active().mCodeSignatures; }
static CssmClient::CSP &csp() { return active().mCSP; }
CssmClient::Module mCSPModule; // CSP module
CssmClient::CSP mCSP; // CSP attachment
- Authority &mAuthority;
CodeSignatures &mCodeSignatures;
// busy state for primary state authority
// destructor inherited
};
+
+//
+// Handling signals.
+// These are sent as Mach messages from ourselves to escape the limitations of
+// the signal handler environment.
+//
+kern_return_t self_server_handleSignal(mach_port_t sport, mach_port_t taskPort, int sig);
+kern_return_t self_server_handleSession(mach_port_t sport, mach_port_t taskPort, uint32_t event, uint64_t ident);
+
#endif //_H_SERVER