summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorschwarze <>2021-11-12 18:56:00 +0000
committerschwarze <>2021-11-12 18:56:00 +0000
commit9ed9dccfc01e224fbb432e3681fc22a9085d7180 (patch)
treefee02469dbe078df2471d9103e68d90ea2a9f571 /src/lib
parent93ed50fc91961bf77f9892ec05c958e951083b25 (diff)
downloadopenbsd-9ed9dccfc01e224fbb432e3681fc22a9085d7180.tar.gz
openbsd-9ed9dccfc01e224fbb432e3681fc22a9085d7180.tar.bz2
openbsd-9ed9dccfc01e224fbb432e3681fc22a9085d7180.zip
Document the public constants X509_V_FLAG_POLICY_MASK
and X509_V_FLAG_USE_CHECK_TIME. While here, fix a typo and improve the wording for X509_V_FLAG_NOTIFY_POLICY.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.352
1 files changed, 43 insertions, 9 deletions
diff --git a/src/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 b/src/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3
index a90fe6ea84..6db1e0ea29 100644
--- a/src/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3
+++ b/src/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3
@@ -1,4 +1,4 @@
1.\" $OpenBSD: X509_VERIFY_PARAM_set_flags.3,v 1.18 2021/10/18 14:46:37 schwarze Exp $ 1.\" $OpenBSD: X509_VERIFY_PARAM_set_flags.3,v 1.19 2021/11/12 18:56:00 schwarze Exp $
2.\" full merge up to: OpenSSL d33def66 Feb 9 14:17:13 2016 -0500 2.\" full merge up to: OpenSSL d33def66 Feb 9 14:17:13 2016 -0500
3.\" selective merge up to: OpenSSL 24a535ea Sep 22 13:14:20 2020 +0100 3.\" selective merge up to: OpenSSL 24a535ea Sep 22 13:14:20 2020 +0100
4.\" 4.\"
@@ -68,7 +68,7 @@
68.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 68.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
69.\" OF THE POSSIBILITY OF SUCH DAMAGE. 69.\" OF THE POSSIBILITY OF SUCH DAMAGE.
70.\" 70.\"
71.Dd $Mdocdate: October 18 2021 $ 71.Dd $Mdocdate: November 12 2021 $
72.Dt X509_VERIFY_PARAM_SET_FLAGS 3 72.Dt X509_VERIFY_PARAM_SET_FLAGS 3
73.Os 73.Os
74.Sh NAME 74.Sh NAME
@@ -231,16 +231,42 @@ section for a complete description of values the
231.Fa flags 231.Fa flags
232parameter can take. 232parameter can take.
233.Pp 233.Pp
234If the
235.Fa flags
236argument includes any of the flags contained in
237.Dv X509_V_FLAG_POLICY_MASK ,
238that is, any of
239.Dv X509_V_FLAG_POLICY_CHECK ,
240.Dv X509_V_FLAG_EXPLICIT_POLICY ,
241.Dv X509_V_FLAG_INHIBIT_ANY ,
242and
243.Dv X509_V_FLAG_INHIBIT_MAP ,
244then
245.Dv X509_V_FLAG_POLICY_CHECK
246is set in addition to the flags contained in the
247.Fa flags
248argument.
249.Pp
234.Fn X509_VERIFY_PARAM_get_flags 250.Fn X509_VERIFY_PARAM_get_flags
235returns the flags in 251returns the flags in
236.Fa param . 252.Fa param .
237.Pp 253.Pp
238.Fn X509_VERIFY_PARAM_clear_flags 254.Fn X509_VERIFY_PARAM_clear_flags
239clears the flags 255clears the specified
240.Fa flags 256.Fa flags
241in 257in
242.Fa param . 258.Fa param .
243.Pp 259.Pp
260Calling this function can result in unsusual internal states of the
261.Fa param
262object, for example having a verification time configured but having
263.Dv X509_V_FLAG_USE_CHECK_TIME
264unset, or having
265.Dv X509_V_FLAG_EXPLICIT_POLICY
266set but
267.Dv X509_V_FLAG_POLICY_CHECK
268unset, which may have surprising effects.
269.Pp
244.Fn X509_VERIFY_PARAM_set_purpose 270.Fn X509_VERIFY_PARAM_set_purpose
245sets the verification 271sets the verification
246.Fa purpose 272.Fa purpose
@@ -262,11 +288,17 @@ to
262.Fa trust . 288.Fa trust .
263.Pp 289.Pp
264.Fn X509_VERIFY_PARAM_set_time 290.Fn X509_VERIFY_PARAM_set_time
265sets the verification time in 291sets the flag
292.Dv X509_V_FLAG_USE_CHECK_TIME
293in
266.Fa param 294.Fa param
267to 295in addition to the flags already set and sets the verification time to
268.Fa t . 296.Fa t .
269Normally the current time is used. 297If this function is not called, the current time is used instead,
298or the UNIX Epoch (January 1, 1970) if
299.Dv X509_V_FLAG_USE_CHECK_TIME
300is manually set using
301.Fn X509_VERIFY_PARAM_set_flags .
270.Pp 302.Pp
271.Fn X509_VERIFY_PARAM_add0_policy 303.Fn X509_VERIFY_PARAM_add0_policy
272enables policy checking (it is disabled by default) and adds 304enables policy checking (it is disabled by default) and adds
@@ -492,12 +524,14 @@ set the
492and 524and
493.Dq inhibit policy mapping 525.Dq inhibit policy mapping
494flags, respectively, as defined in RFC 3280. 526flags, respectively, as defined in RFC 3280.
495Policy checking is automatically enabled if any of these flags are set. 527These three flags are ignored unless
528.Dv X509_V_FLAG_POLICY_CHECK
529is also set.
496.Pp 530.Pp
497If 531If
498.Dv X509_V_FLAG_NOTIFY_POLICY 532.Dv X509_V_FLAG_NOTIFY_POLICY
499is set and the policy checking is successful a special status code is 533is set and policy checking is successful, a special status code is
500set to the verification callback. 534sent to the verification callback.
501This permits it to examine the valid policy tree and perform additional 535This permits it to examine the valid policy tree and perform additional
502checks or simply log it for debugging purposes. 536checks or simply log it for debugging purposes.
503.Pp 537.Pp