/*++ /* NAME /* pol_stats 3 /* SUMMARY /* manage per-feature policy compliance status /* SYNOPSIS /* #include <pol_stats.h> /* /* POL_STATS *pol_stats_create(void) /* /* void pol_stats_revert(POL_STATS *pstats) /* /* void pol_stats_free(POL_STATS *pstats) /* /* void pol_stat_activate( /* POL_STATS *pstats, /* int idx, /* const char *init_name) /* /* void pol_stat_decide( /* POL_STATS *pstats, /* int idx, /* const char *final_name, /* int status) /* /* int pol_stats_used(POL_STATS *pstats) /* /* pol_stats_format( /* VSTRING *buf, /* const POL_STATS *pstats) /* DESCRIPTION /* This module records for each activated feature whether the /* current program state satisfies the policy requirements for that /* feature. For example, whether a TLS handshake result matches /* DANE or STS requirements. The combined feature state can /* concisely be formatted with pol_stats_format() and exposed /* with logging. /* /* Each feature has an initial name with the desired policy state, /* and a final name that corresponds to the policy state that was /* actually achieved. If the two names differ, then both names will /* be logged as initial:final. /* /* pol_stats_create() creates one POL_STATS instance with all status /* information set to POL_STAT_INACTIVE. /* /* pol_stats_revert() reverts all changes after pol_stats_create(). /* /* pol_stats_free() recycles storage for a POL_STATS instance. /* /* Specific status information is accessed with an index. Valid /* indices are 0 or 1 (the caller decides their purpose). /* /* pol_stat_activate() changes the status in pstats at index idx /* from POL_STAT_INACTIVE to POL_STAT_UNDECIDED, and updates the /* feature's initial name (pointer copy). Calls with an invalid /* index result in a panic(), and calls with an already active /* index result in a warning. /* /* pol_stat_decide() updates the status in pstats at index idx from /* POL_STAT_UNDECIDED to POL_STAT_COMPLIANT or POL_STAT_VIOLATION, /* and records its final name or NULL (pointer copy). Calls with /* an invalid index or an unexpected decision status result in /* a panic(), and calls with an inactive or already decided index /* status result in a warning. /* /* pol_stats_used() returns the number of activated categories for /* its argument. /* /* pol_stats_format() formats TLS feature status information as /* feature/feature/etc., where: /* .IP \(bu /* Each feature name is the initial name given to /* pol_stat_activate(). /* .IP \(bu /* When ':final-name' is appended to a feature name, the feature /* was downgraded to the final name given to pol_stats_decide(). /* This does not necessarily imply policy compliance or /* non-compliance for that feature. /* .IP \(bu /* When "!" is prepended to the feature, the policy for that feature /* was not satisfied and the operation was blocked. /* .IP \(bu /* When "?" is appended to the feature, the policy for that feature /* was left undecided. This typically caused by a lost connection. /* LICENSE /* .ad /* .fi /* The Secure Mailer license must be distributed with this software. /* AUTHOR(S) /* Wietse Venema /* porcupine.org
/*--*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.