MPDC: Multi Party Domain Cryptosystem 1.0.0.0b (A0)
MPDC Interior protocol
|
The common MPDC server functions. More...
#include "common.h"
#include "certificate.h"
#include "commands.h"
#include "logger.h"
#include "mpdc.h"
#include "topology.h"
#include "../../QSC/QSC/collection.h"
Go to the source code of this file.
Data Structures | |
struct | mpdc_server_application_state |
The MPDC server state. More... | |
Macros | |
#define | MPDC_SERVER_MINIMUM_COMMAND_LENGTH 4 |
The minimum valid length for a server command. | |
#define | MPDC_SERVER_APPLICATION_STATE_SIZE |
Calculates the size of the MPDC server application state. | |
Typedefs | |
typedef MPDC_EXPORT_API enum mpdc_server_server_loop_status | mpdc_server_server_loop_status |
typedef MPDC_EXPORT_API struct mpdc_server_application_state | mpdc_server_application_state |
Enumerations | |
enum | mpdc_server_server_loop_status { mpdc_server_loop_status_stopped = 0x00 , mpdc_server_loop_status_started = 0x01 , mpdc_server_loop_status_paused = 0x02 } |
The MPDC server loop status. More... | |
Functions | |
MPDC_EXPORT_API void | mpdc_server_certificate_directory (const mpdc_server_application_state *state, char *dpath, size_t pathlen) |
Get the full delimited path to the certificate storage directory. | |
MPDC_EXPORT_API void | mpdc_server_certificate_path (const mpdc_server_application_state *state, char *fpath, size_t pathlen, const char *issuer) |
Get the full path to a certificate. | |
MPDC_EXPORT_API bool | mpdc_server_child_certificate_export (const mpdc_server_application_state *state, const char *dpath) |
Export the local certificate to a file. | |
MPDC_EXPORT_API bool | mpdc_server_child_certificate_from_issuer (mpdc_child_certificate *ccert, const mpdc_server_application_state *state, const char *issuer) |
Get the certificate instance from file using the issuer string. | |
MPDC_EXPORT_API bool | mpdc_server_child_certificate_from_serial (mpdc_child_certificate *ccert, const mpdc_server_application_state *state, const uint8_t *serial) |
Get the certificate instance from file using the serial number. | |
MPDC_EXPORT_API void | mpdc_server_child_certificate_generate (mpdc_server_application_state *state, mpdc_child_certificate *ccert, uint64_t period) |
Generate a new child certificate. | |
MPDC_EXPORT_API bool | mpdc_server_child_certificate_import (mpdc_child_certificate *lcert, mpdc_server_application_state *state, const char *fpath) |
Import the local certificate signed by the root. | |
MPDC_EXPORT_API void | mpdc_server_child_certificate_path (const mpdc_server_application_state *state, char *fpath, size_t pathlen) |
Get the full path to the child certificate. | |
MPDC_EXPORT_API void | mpdc_server_child_certificate_path_from_issuer (const mpdc_server_application_state *state, char *fpath, size_t pathlen, const char *issuer) |
Get the certificate file path from the certificate issuer name. | |
MPDC_EXPORT_API bool | mpdc_server_child_certificate_print (const char *fpath, size_t pathlen) |
Print the local child certificate to console. | |
MPDC_EXPORT_API void | mpdc_server_local_certificate_store (mpdc_server_application_state *state, const mpdc_child_certificate *ccert, const char *address) |
Store a child certificate. | |
MPDC_EXPORT_API void | mpdc_server_clear_config (mpdc_server_application_state *state) |
Erase and reset the configuration file. | |
MPDC_EXPORT_API void | mpdc_server_clear_log (mpdc_server_application_state *state) |
Erase the log file. | |
MPDC_EXPORT_API void | mpdc_server_erase_all (mpdc_server_application_state *state) |
Erase all state, including log files, and reset configuration. | |
MPDC_EXPORT_API void | mpdc_server_log_host (mpdc_server_application_state *state) |
Enable logging on the server. | |
MPDC_EXPORT_API void | mpdc_server_log_print (mpdc_server_application_state *state) |
Print the log file to the console. | |
MPDC_EXPORT_API bool | mpdc_server_log_write_message (mpdc_server_application_state *state, mpdc_application_messages msgtype, const char *message, size_t msglen) |
Write a message to the log. | |
MPDC_EXPORT_API void | mpdc_server_mfkcol_path (const mpdc_server_application_state *state, char *fpath, size_t pathlen) |
Get the path to the mfk collection file. | |
MPDC_EXPORT_API bool | mpdc_server_mfkcol_from_file (qsc_collection_state *mfkcol, const mpdc_server_application_state *state) |
Convert an encrypted mfk collection file to a collection state. | |
MPDC_EXPORT_API void | mpdc_server_mfkcol_to_file (const qsc_collection_state *mfkcol, const mpdc_server_application_state *state) |
Convert an mfk collection to an encrypted file. | |
MPDC_EXPORT_API void | mpdc_server_print_banner (const mpdc_server_application_state *state) |
Print the server banner. | |
MPDC_EXPORT_API void | mpdc_server_print_error (const mpdc_server_application_state *state, mpdc_application_messages appmsg, const char *message, mpdc_protocol_errors error) |
Print a network error to the console. | |
MPDC_EXPORT_API void | mpdc_server_print_configuration (const mpdc_server_application_state *state) |
Print the server configuration. | |
MPDC_EXPORT_API bool | mpdc_server_root_certificate_export (const mpdc_server_application_state *state, const char *dpath) |
Export the root certificate to a directory. | |
MPDC_EXPORT_API bool | mpdc_server_root_import_dialogue (mpdc_server_application_state *state) |
Import the root certificate. | |
MPDC_EXPORT_API void | mpdc_server_root_certificate_generate (mpdc_server_application_state *state, mpdc_root_certificate *rcert, uint64_t period) |
Generate a new root certificate. | |
MPDC_EXPORT_API bool | mpdc_server_root_certificate_load (const mpdc_server_application_state *state, mpdc_root_certificate *root, const mpdc_topology_list_state *tlist) |
Load a root certificate using the issuer name. | |
MPDC_EXPORT_API bool | mpdc_server_root_certificate_print (const char *fpath, size_t pathlen) |
Print a formatted root certificate to console. | |
MPDC_EXPORT_API void | mpdc_server_root_certificate_store (mpdc_server_application_state *state, const mpdc_root_certificate *rcert) |
Store a root certificate to a file. | |
MPDC_EXPORT_API void | mpdc_server_set_command_prompt (mpdc_server_application_state *state) |
Set the command prompt to the current state mode. | |
MPDC_EXPORT_API bool | mpdc_server_set_console_timeout (mpdc_server_application_state *state, const char *snum, size_t numlen) |
Set the number of idle minutes before the user is logged out. | |
MPDC_EXPORT_API bool | mpdc_server_set_domain_name (mpdc_server_application_state *state, const char *name, size_t namelen) |
Rename the network domain. | |
MPDC_EXPORT_API bool | mpdc_server_set_host_name (mpdc_server_application_state *state, const char *name, size_t namelen) |
Rename the server host. | |
MPDC_EXPORT_API bool | mpdc_server_set_ip_address (mpdc_server_application_state *state, const char *address, size_t addlen) |
Set the IP address of the server. | |
MPDC_EXPORT_API bool | mpdc_server_set_password_retries (mpdc_server_application_state *state, const char *snum, size_t numlen) |
Set the number of failed password retries. | |
MPDC_EXPORT_API void | mpdc_server_erase_signature_key (mpdc_server_application_state *state) |
Erase the signature-scheme signing key. | |
MPDC_EXPORT_API void | mpdc_server_state_backup_restore (const mpdc_server_application_state *state) |
Restore the state from backup. | |
MPDC_EXPORT_API void | mpdc_server_state_backup_save (const mpdc_server_application_state *state) |
Backup the state. | |
MPDC_EXPORT_API void | mpdc_server_state_initialize (mpdc_server_application_state *state, mpdc_network_designations srvtype) |
Initialize the internal state. | |
MPDC_EXPORT_API bool | mpdc_server_state_store (mpdc_server_application_state *state) |
Write the server state to file. | |
MPDC_EXPORT_API void | mpdc_server_state_unload (mpdc_server_application_state *state) |
Unload the server state from memory. | |
MPDC_EXPORT_API bool | mpdc_server_topology_dla_fetch (const mpdc_server_application_state *state, mpdc_child_certificate *dcert) |
Load the DLA certificate from state. | |
MPDC_EXPORT_API bool | mpdc_server_topology_load (mpdc_server_application_state *state) |
Load the topology from an encrypted file to state. | |
MPDC_EXPORT_API void | mpdc_server_topology_print_list (mpdc_server_application_state *state) |
Print the topological list to the console. | |
MPDC_EXPORT_API void | mpdc_server_topology_purge_externals (mpdc_server_application_state *state) |
Clear the topology list except for the root and local nodes. | |
MPDC_EXPORT_API void | mpdc_server_topology_remove_certificate (mpdc_server_application_state *state, const char *issuer) |
Delete the certificate. | |
MPDC_EXPORT_API void | mpdc_server_topology_remove_node (mpdc_server_application_state *state, const char *issuer) |
Remove a node from the topology. | |
MPDC_EXPORT_API void | mpdc_server_topology_reset (mpdc_server_application_state *state) |
Delete all nodes and certificates except for the root. | |
MPDC_EXPORT_API bool | mpdc_server_topology_local_fetch (const mpdc_server_application_state *state, mpdc_child_certificate *ccert) |
Load the local certificate from state. | |
MPDC_EXPORT_API bool | mpdc_server_topology_root_exists (const mpdc_server_application_state *state) |
Check if the root certificate exists on file. | |
MPDC_EXPORT_API bool | mpdc_server_topology_root_fetch (const mpdc_server_application_state *state, mpdc_root_certificate *rcert) |
Load the root certificate from state. | |
MPDC_EXPORT_API void | mpdc_server_topology_to_file (mpdc_server_application_state *state) |
Copy the topology to an encrypted file. | |
MPDC_EXPORT_API bool | mpdc_server_user_login (mpdc_server_application_state *state) |
Start the user login dialogue. | |
MPDC_EXPORT_API void | mpdc_server_user_logout (mpdc_server_application_state *state) |
Log out of the server. | |
The common MPDC server functions.
Detailed File Description: This header file defines the common functions, macros, enumerations, and data structures used by the MPDC server. The functions in this file cover certificate management, logging, topology management, configuration, state backup and restore, and user login functionalities. Every public function, macro, struct, and enumeration is documented in detail below.
#define MPDC_SERVER_APPLICATION_STATE_SIZE |
Calculates the size of the MPDC server application state.
This macro sums the sizes of various maximum string lengths and fixed?size fields used in the server state structure.
MPDC_EXPORT_API void mpdc_server_certificate_directory | ( | const mpdc_server_application_state * | state, |
char * | dpath, | ||
size_t | pathlen ) |
Get the full delimited path to the certificate storage directory.
This function builds the full directory path where certificates are stored, based on the server's configuration in the application state.
state | [const] The server application state. |
dpath | The output buffer that receives the certificate storage directory path. |
pathlen | The length of the dpath buffer. |
MPDC_EXPORT_API void mpdc_server_certificate_path | ( | const mpdc_server_application_state * | state, |
char * | fpath, | ||
size_t | pathlen, | ||
const char * | issuer ) |
Get the full path to a certificate.
This function constructs the full file path to a certificate based on the certificate issuer.
state | [const] The server application state. |
fpath | The output buffer that receives the certificate file path. |
pathlen | The length of the fpath buffer. |
issuer | [const] The issuer name of the certificate. |
MPDC_EXPORT_API bool mpdc_server_child_certificate_export | ( | const mpdc_server_application_state * | state, |
const char * | dpath ) |
Export the local certificate to a file.
This function exports the local child certificate to the specified destination directory.
state | [const] The server application state. |
dpath | The destination directory path. |
MPDC_EXPORT_API bool mpdc_server_child_certificate_from_issuer | ( | mpdc_child_certificate * | ccert, |
const mpdc_server_application_state * | state, | ||
const char * | issuer ) |
Get the certificate instance from file using the issuer string.
This function loads a child certificate from file using the issuer string.
ccert | The output child certificate. |
state | [const] The server application state. |
issuer | [const] The certificate issuer string. |
MPDC_EXPORT_API bool mpdc_server_child_certificate_from_serial | ( | mpdc_child_certificate * | ccert, |
const mpdc_server_application_state * | state, | ||
const uint8_t * | serial ) |
Get the certificate instance from file using the serial number.
This function loads a child certificate from file using its serial number.
ccert | The output child certificate. |
state | [const] The server application state. |
serial | [const] The certificate serial number. |
MPDC_EXPORT_API void mpdc_server_child_certificate_generate | ( | mpdc_server_application_state * | state, |
mpdc_child_certificate * | ccert, | ||
uint64_t | period ) |
Generate a new child certificate.
This function generates a new child certificate, writes the signature private key to the server state, and populates the child certificate structure.
state | The server application state. The private key is written to state->sigkey. |
ccert | The output child certificate. |
period | The number of seconds the certificate is valid. |
MPDC_EXPORT_API bool mpdc_server_child_certificate_import | ( | mpdc_child_certificate * | lcert, |
mpdc_server_application_state * | state, | ||
const char * | fpath ) |
Import the local certificate signed by the root.
This function imports the local certificate that has been signed by the root certificate.
lcert | The local certificate structure to populate. |
state | The server application state. |
fpath | The full file path to the certificate file. |
MPDC_EXPORT_API void mpdc_server_child_certificate_path | ( | const mpdc_server_application_state * | state, |
char * | fpath, | ||
size_t | pathlen ) |
Get the full path to the child certificate.
This function retrieves the full file path of the child certificate based on the server state.
state | [const] The server application state. |
fpath | The output buffer that receives the certificate file path. |
pathlen | The length of the fpath buffer. |
MPDC_EXPORT_API void mpdc_server_child_certificate_path_from_issuer | ( | const mpdc_server_application_state * | state, |
char * | fpath, | ||
size_t | pathlen, | ||
const char * | issuer ) |
Get the certificate file path from the certificate issuer name.
This function constructs the file path to a certificate using the issuer name.
state | [const] The server application state. |
fpath | The output buffer that receives the file path. |
pathlen | The length of the file path buffer. |
issuer | The certificate's issuer name. |
MPDC_EXPORT_API bool mpdc_server_child_certificate_print | ( | const char * | fpath, |
size_t | pathlen ) |
Print the local child certificate to console.
This function prints the local child certificate (read from file) to the console.
fpath | The file path to the certificate. |
pathlen | The length of the file path buffer. |
MPDC_EXPORT_API void mpdc_server_clear_config | ( | mpdc_server_application_state * | state | ) |
Erase and reset the configuration file.
This function erases the current configuration file and resets it.
state | The server application state. |
MPDC_EXPORT_API void mpdc_server_clear_log | ( | mpdc_server_application_state * | state | ) |
Erase the log file.
This function erases the server log file.
state | The server application state. |
MPDC_EXPORT_API void mpdc_server_erase_all | ( | mpdc_server_application_state * | state | ) |
Erase all state, including log files, and reset configuration.
This function erases all persistent state and log files, effectively resetting the server.
state | The server application state. |
MPDC_EXPORT_API void mpdc_server_erase_signature_key | ( | mpdc_server_application_state * | state | ) |
Erase the signature-scheme signing key.
This function erases the signing key stored in the server state.
state | The server application state. |
MPDC_EXPORT_API void mpdc_server_local_certificate_store | ( | mpdc_server_application_state * | state, |
const mpdc_child_certificate * | ccert, | ||
const char * | address ) |
Store a child certificate.
This function stores the local child certificate to file using the server state information.
state | The server application state. |
ccert | The child certificate to store. |
address | The network address associated with the certificate. |
MPDC_EXPORT_API void mpdc_server_log_host | ( | mpdc_server_application_state * | state | ) |
Enable logging on the server.
This function enables host logging for the server.
state | The server application state. |
MPDC_EXPORT_API void mpdc_server_log_print | ( | mpdc_server_application_state * | state | ) |
Print the log file to the console.
This function outputs the contents of the server log file to the console.
state | The server application state. |
MPDC_EXPORT_API bool mpdc_server_log_write_message | ( | mpdc_server_application_state * | state, |
mpdc_application_messages | msgtype, | ||
const char * | message, | ||
size_t | msglen ) |
Write a message to the log.
This function writes a log message with an optional predefined message header.
state | The server application state. |
msgtype | The predefined message enumerator. |
message | [const] The optional text message. |
msglen | The length of the text message. |
MPDC_EXPORT_API bool mpdc_server_mfkcol_from_file | ( | qsc_collection_state * | mfkcol, |
const mpdc_server_application_state * | state ) |
Convert an encrypted mfk collection file to a collection state.
This function reads the encrypted mfk collection from file and converts it into the internal collection state.
mfkcol | The empty collection state that will be populated. |
state | [const] The server application state. |
MPDC_EXPORT_API void mpdc_server_mfkcol_path | ( | const mpdc_server_application_state * | state, |
char * | fpath, | ||
size_t | pathlen ) |
Get the path to the mfk collection file.
This function constructs the full file path for the master fragmentation key (mfk) collection.
state | [const] The server application state. |
fpath | The output buffer that receives the file path. |
pathlen | The length of the fpath buffer. |
MPDC_EXPORT_API void mpdc_server_mfkcol_to_file | ( | const qsc_collection_state * | mfkcol, |
const mpdc_server_application_state * | state ) |
Convert an mfk collection to an encrypted file.
This function writes the current mfk collection state to an encrypted file.
mfkcol | [const] The mfk collection state. |
state | [const] The server application state. |
MPDC_EXPORT_API void mpdc_server_print_banner | ( | const mpdc_server_application_state * | state | ) |
Print the server banner.
This function prints the server banner to the console.
state | [const] The server application state. |
MPDC_EXPORT_API void mpdc_server_print_configuration | ( | const mpdc_server_application_state * | state | ) |
Print the server configuration.
This function prints the current server configuration to the console.
state | [const] The server application state. |
MPDC_EXPORT_API void mpdc_server_print_error | ( | const mpdc_server_application_state * | state, |
mpdc_application_messages | appmsg, | ||
const char * | message, | ||
mpdc_protocol_errors | error ) |
Print a network error to the console.
This function prints a formatted error message for network errors.
state | [const] The server application state. |
appmsg | The predefined application message enumerator. |
message | The error message text. |
error | The protocol error code. |
MPDC_EXPORT_API bool mpdc_server_root_certificate_export | ( | const mpdc_server_application_state * | state, |
const char * | dpath ) |
Export the root certificate to a directory.
This function exports the server's root certificate to the specified destination directory.
state | [const] The server application state. |
dpath | The destination directory path. |
MPDC_EXPORT_API void mpdc_server_root_certificate_generate | ( | mpdc_server_application_state * | state, |
mpdc_root_certificate * | rcert, | ||
uint64_t | period ) |
Generate a new root certificate.
This function generates a new root certificate, writes the signature private key to the server state, and populates the root certificate structure.
state | The server application state; the private key is written to state->sigkey. |
rcert | The output root certificate. |
period | The validity period (in seconds) for the certificate. |
MPDC_EXPORT_API bool mpdc_server_root_certificate_load | ( | const mpdc_server_application_state * | state, |
mpdc_root_certificate * | root, | ||
const mpdc_topology_list_state * | tlist ) |
Load a root certificate using the issuer name.
This function loads the root certificate from file using the issuer name.
state | [const] The server application state. |
root | The output root certificate. |
tlist | [const] A pointer to the topology list. |
MPDC_EXPORT_API bool mpdc_server_root_certificate_print | ( | const char * | fpath, |
size_t | pathlen ) |
Print a formatted root certificate to console.
This function prints a formatted version of the root certificate to the console.
fpath | The file path to the root certificate. |
pathlen | The length of the file path buffer. |
MPDC_EXPORT_API void mpdc_server_root_certificate_store | ( | mpdc_server_application_state * | state, |
const mpdc_root_certificate * | rcert ) |
Store a root certificate to a file.
This function stores the root certificate to file.
state | The server application state. |
rcert | The root certificate to store. |
address | The root certificate's address. |
MPDC_EXPORT_API bool mpdc_server_root_import_dialogue | ( | mpdc_server_application_state * | state | ) |
Import the root certificate.
This function prompts the user to import the root certificate through a dialogue.
state | The server application state. |
MPDC_EXPORT_API void mpdc_server_set_command_prompt | ( | mpdc_server_application_state * | state | ) |
Set the command prompt to the current state mode.
This function sets the command prompt based on the current console mode in the server state.
state | The server application state. |
MPDC_EXPORT_API bool mpdc_server_set_console_timeout | ( | mpdc_server_application_state * | state, |
const char * | snum, | ||
size_t | numlen ) |
Set the number of idle minutes before the user is logged out.
This function configures the console timeout period (in minutes) for automatic user logout.
state | The server application state. |
snum | The number string representing the timeout period in minutes. |
numlen | The length of the number string. |
MPDC_EXPORT_API bool mpdc_server_set_domain_name | ( | mpdc_server_application_state * | state, |
const char * | name, | ||
size_t | namelen ) |
Rename the network domain.
This function renames the network domain in the server configuration.
state | The server application state. |
name | The new domain name. |
namelen | The length of the domain name string. |
MPDC_EXPORT_API bool mpdc_server_set_host_name | ( | mpdc_server_application_state * | state, |
const char * | name, | ||
size_t | namelen ) |
Rename the server host.
This function renames the server host in the configuration.
state | The server application state. |
name | The new host name. |
namelen | The length of the host name string. |
MPDC_EXPORT_API bool mpdc_server_set_ip_address | ( | mpdc_server_application_state * | state, |
const char * | address, | ||
size_t | addlen ) |
Set the IP address of the server.
This function sets the server's IP address.
state | The server application state. |
address | The IP address string. |
addlen | The length of the address string. |
MPDC_EXPORT_API bool mpdc_server_set_password_retries | ( | mpdc_server_application_state * | state, |
const char * | snum, | ||
size_t | numlen ) |
Set the number of failed password retries.
This function sets the maximum number of failed password attempts allowed.
state | The server application state. |
snum | The number string representing the number of retries. |
numlen | The length of the number string. |
MPDC_EXPORT_API void mpdc_server_state_backup_restore | ( | const mpdc_server_application_state * | state | ) |
Restore the state from backup.
This function restores the server state from a previously saved backup.
state | The server application state. |
MPDC_EXPORT_API void mpdc_server_state_backup_save | ( | const mpdc_server_application_state * | state | ) |
Backup the state.
This function saves the current server state to a backup file.
state | The server application state. |
MPDC_EXPORT_API void mpdc_server_state_initialize | ( | mpdc_server_application_state * | state, |
mpdc_network_designations | srvtype ) |
Initialize the internal state.
This function initializes the MPDC server state for a given server type.
state | The server application state. |
srvtype | The server type designation. |
MPDC_EXPORT_API bool mpdc_server_state_store | ( | mpdc_server_application_state * | state | ) |
Write the server state to file.
This function writes the current server state to an encrypted file.
state | The server application state. |
MPDC_EXPORT_API void mpdc_server_state_unload | ( | mpdc_server_application_state * | state | ) |
Unload the server state from memory.
This function unloads and clears the current server state from memory.
state | The server application state. |
MPDC_EXPORT_API bool mpdc_server_topology_dla_fetch | ( | const mpdc_server_application_state * | state, |
mpdc_child_certificate * | dcert ) |
Load the DLA certificate from state.
This function loads the DLA certificate from the server state.
state | [const] The server application state. |
dcert | The output DLA certificate. |
MPDC_EXPORT_API bool mpdc_server_topology_load | ( | mpdc_server_application_state * | state | ) |
Load the topology from an encrypted file to state.
This function loads the network topology from an encrypted file into the server state.
state | The server application state. |
MPDC_EXPORT_API bool mpdc_server_topology_local_fetch | ( | const mpdc_server_application_state * | state, |
mpdc_child_certificate * | ccert ) |
Load the local certificate from state.
This function loads the local child certificate from the server state.
state | [const] The server application state. |
ccert | The output local certificate. |
MPDC_EXPORT_API void mpdc_server_topology_print_list | ( | mpdc_server_application_state * | state | ) |
Print the topological list to the console.
This function prints the network topology list to the console.
state | [const] The server application state. |
MPDC_EXPORT_API void mpdc_server_topology_purge_externals | ( | mpdc_server_application_state * | state | ) |
Clear the topology list except for the root and local nodes.
This function purges the topology list by deleting all nodes except for the root and local nodes.
state | The server application state. |
MPDC_EXPORT_API void mpdc_server_topology_remove_certificate | ( | mpdc_server_application_state * | state, |
const char * | issuer ) |
Delete the certificate.
This function deletes a certificate from the topology based on its issuer.
state | The server application state. |
issuer | The target node's issuer string. |
MPDC_EXPORT_API void mpdc_server_topology_remove_node | ( | mpdc_server_application_state * | state, |
const char * | issuer ) |
Remove a node from the topology.
This function removes a node from the topology list based on its issuer.
state | The server application state. |
issuer | The target node's issuer string. |
MPDC_EXPORT_API void mpdc_server_topology_reset | ( | mpdc_server_application_state * | state | ) |
Delete all nodes and certificates except for the root.
This function resets the topology list by deleting all nodes and certificates except the root.
state | The server application state. |
MPDC_EXPORT_API bool mpdc_server_topology_root_exists | ( | const mpdc_server_application_state * | state | ) |
Check if the root certificate exists on file.
This function checks whether the root certificate file exists.
state | [const] The server application state. |
MPDC_EXPORT_API bool mpdc_server_topology_root_fetch | ( | const mpdc_server_application_state * | state, |
mpdc_root_certificate * | rcert ) |
Load the root certificate from state.
This function loads the root certificate from the server state.
state | [const] The server application state. |
rcert | The output root certificate. |
MPDC_EXPORT_API void mpdc_server_topology_to_file | ( | mpdc_server_application_state * | state | ) |
Copy the topology to an encrypted file.
This function writes the current network topology from the server state to an encrypted file.
state | The server application state. |
MPDC_EXPORT_API bool mpdc_server_user_login | ( | mpdc_server_application_state * | state | ) |
Start the user login dialogue.
This function initiates the user login process and prompts for credentials.
state | The server application state. |
MPDC_EXPORT_API void mpdc_server_user_logout | ( | mpdc_server_application_state * | state | ) |
Log out of the server.
This function logs out the current user and resets the session.
state | The server application state. |