Sortix volatile manual
This manual documents Sortix volatile, a development build that has not been officially released. You can instead view this document in the latest official manual.
NAME
X509_STORE_CTX_set_flags, X509_STORE_CTX_set_time, X509_STORE_CTX_set_depth, X509_STORE_CTX_set_trust, X509_STORE_CTX_set_purpose, X509_STORE_CTX_purpose_inherit, X509_STORE_CTX_get0_param, X509_STORE_CTX_set0_param, X509_STORE_CTX_set_default — X509_STORE_CTX parameter initialisationSYNOPSIS
#include <openssl/x509_vfy.h>X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, unsigned long flags);
X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, unsigned long dummy, time_t time);
X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth);
X509_STORE_CTX_set_trust(X509_STORE_CTX *ctx, int trust);
X509_STORE_CTX_set_purpose(X509_STORE_CTX *ctx, int purpose);
X509_STORE_CTX_purpose_inherit(X509_STORE_CTX *ctx, int def_purpose, int purpose, int trust);
X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx);
X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param);
X509_STORE_CTX_set_default(X509_STORE_CTX *ctx, const char *name);
DESCRIPTION
These functions operate on the X509_VERIFY_PARAM object used by ctx. Usually, X509_STORE_CTX_init(3) is called on ctx before these functions, and X509_verify_cert(3) afterwards.- If the purpose argument is 0, def_purpose is used instead.
- If the associated trust is X509_TRUST_DEFAULT, the trust associated with def_purpose is used instead, or if def_purpose is 0 or invalid, the function fails.
- If the trust argument is not 0, it is used instead of the associated trust, and the equivalent of calling X509_STORE_CTX_set_trust() is done even if both purpose and def_purpose are 0. Even if the trust argument is not 0, if the (then unused) associated trust is X509_TRUST_DEFAULT, def_purpose is still required to be valid.
RETURN VALUES
X509_STORE_CTX_set_trust() returns 1 if the trust argument is 0 or valid or 0 if it is not 0 but invalid. A return value of 1 does not imply that the trust identifier stored in the X509_VERIFY_PARAM object was changed.- The purpose argument is not 0 and invalid.
- The purpose argument is 0 and the def_purpose argument is not 0 and invalid.
- The associated trust is X509_TRUST_DEFAULT and the def_purpose argument is 0 or invalid, or the trust identifier associated with it is not 0 but invalid.
- The trust argument is not 0 and invalid.
- The trust argument is 0 and the associated trust is neither 0 nor X509_TRUST_DEFAULT but invalid.
ERRORS
For X509_STORE_CTX_set_trust(), X509_STORE_CTX_set_purpose(), and X509_STORE_CTX_purpose_inherit(), the following diagnostics can be retrieved with ERR_get_error(3), ERR_GET_REASON(3), and ERR_reason_error_string(3):- X509_R_UNKNOWN_TRUST_ID “unknown trust id”
- The trust argument or the trust identifier associated with purpose or def_purpose is not 0 but invalid,
- X509_R_UNKNOWN_PURPOSE_ID “unknown purpose id”
- The purpose argument is not 0 and invalid. Or it is 0 and the def_purpose argument is not 0 and invalid. Or the associated trust is X509_TRUST_DEFAULT and def_purpose is 0 or invalid.