|
UDIF: Universal Digital Identification Framework 1.1.0.0a (A1)
A quantum-secure cryptographic identification
|
Forward declarations for QSTP functions used by UDIF role modules. More...
#include "qstp.h"Go to the source code of this file.
Functions | |
| QSTP_EXPORT_API void | qstp_root_key_generate (qstp_root_signature_key *kset, const char issuer[QSTP_CERTIFICATE_ISSUER_SIZE], uint32_t exp) |
| QSTP_EXPORT_API void | qstp_server_key_generate (qstp_server_signature_key *kset, const char issuer[QSTP_CERTIFICATE_ISSUER_SIZE], uint32_t exp) |
| QSTP_EXPORT_API qstp_errors | qstp_server_start_ipv4 (qsc_socket *source, const qstp_server_signature_key *kset, void(*receive_callback)(qstp_connection_state *, const char *, size_t), void(*disconnect_callback)(qstp_connection_state *)) |
| Start the IPv4 QSTP multi-threaded server. | |
| QSTP_EXPORT_API qstp_errors | qstp_client_connect_ipv4 (const qstp_root_certificate *root, const qstp_server_certificate *cert, const qsc_ipinfo_ipv4_address *address, uint16_t port, void(*send_func)(qstp_connection_state *), void(*receive_callback)(qstp_connection_state *, const char *, size_t)) |
| Connect to a QSTP server over IPv4. | |
Forward declarations for QSTP functions used by UDIF role modules.
qstp_root_key_generate, qstp_server_key_generate, qstp_server_start_ipv4, and qstp_client_connect_ipv4 are defined in the QSTP project (root.h / server.h / client.h). When those headers are on the compiler's include path the guard macros QSTP_ROOT_H / QSTP_SERVER_H / QSTP_CLIENT_H suppress these declarations. When they are not available these externs satisfy the compiler; the linker resolves the symbols from the QSTP lib.
| QSTP_EXPORT_API qstp_errors qstp_client_connect_ipv4 | ( | const qstp_root_certificate * | root, |
| const qstp_server_certificate * | cert, | ||
| const qsc_ipinfo_ipv4_address * | address, | ||
| uint16_t | port, | ||
| void(* | send_func )(qstp_connection_state *), | ||
| void(* | receive_callback )(qstp_connection_state *, const char *, size_t) ) |
Connect to a QSTP server over IPv4.
| root | Root certificate (trust anchor) |
| cert | Client's server certificate |
| address | Server IPv4 address |
| port | Server port |
| send_func | Send-loop callback (drives keepalive / ratchet) |
| receive_callback | Called when a message arrives |
| QSTP_EXPORT_API void qstp_root_key_generate | ( | qstp_root_signature_key * | kset, |
| const char | issuer[QSTP_CERTIFICATE_ISSUER_SIZE], | ||
| uint32_t | exp ) |
generate a new QSTP root signing keypair.
| QSTP_EXPORT_API void qstp_server_key_generate | ( | qstp_server_signature_key * | kset, |
| const char | issuer[QSTP_CERTIFICATE_ISSUER_SIZE], | ||
| uint32_t | exp ) |
Generate a new QSTP server signing keypair.
| QSTP_EXPORT_API qstp_errors qstp_server_start_ipv4 | ( | qsc_socket * | source, |
| const qstp_server_signature_key * | kset, | ||
| void(* | receive_callback )(qstp_connection_state *, const char *, size_t), | ||
| void(* | disconnect_callback )(qstp_connection_state *) ) |
Start the IPv4 QSTP multi-threaded server.
The function initializes, binds, and listens on the socket internally. Blocks until the server is stopped.
| source | Pre-zeroed qsc_socket (filled by this function) |
| kset | Server signature key |
| receive_callback | Called when a message arrives |
| disconnect_callback | Called when a client disconnects |