mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-15 18:20:20 +00:00
Added STS profile persistence and policy parsing/enforcement (including load/save, upgrades, and expiry rescheduling) to the STS module.
Integrated STS capability handling and connection lifecycle hooks (ignore CAP DEL, trigger upgrades, reschedule on disconnect, new server fields). Initialized and cleaned up STS state during startup/shutdown to persist policies across sessions.
This commit is contained in:
@@ -24,20 +24,30 @@
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
struct server;
|
||||
|
||||
typedef struct sts_profile
|
||||
{
|
||||
char *host;
|
||||
guint16 port;
|
||||
time_t expires_at;
|
||||
guint64 duration;
|
||||
gboolean preload;
|
||||
} sts_profile;
|
||||
|
||||
sts_profile *sts_profile_new (const char *host, guint16 port, time_t expires_at, gboolean preload);
|
||||
sts_profile *sts_profile_new (const char *host, guint16 port, time_t expires_at, guint64 duration, gboolean preload);
|
||||
void sts_profile_free (sts_profile *profile);
|
||||
|
||||
char *sts_profile_serialize (const sts_profile *profile);
|
||||
sts_profile *sts_profile_deserialize (const char *serialized);
|
||||
|
||||
void sts_init (void);
|
||||
void sts_save (void);
|
||||
void sts_cleanup (void);
|
||||
gboolean sts_apply_policy_for_connection (struct server *serv, const char *hostname, int *port);
|
||||
gboolean sts_handle_capability (struct server *serv, const char *value);
|
||||
void sts_reschedule_on_disconnect (struct server *serv);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user