summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3
diff options
context:
space:
mode:
authorschwarze <>2021-10-18 14:46:37 +0000
committerschwarze <>2021-10-18 14:46:37 +0000
commitc20556b36f9b080fd212baf56e6df9a9644e9310 (patch)
treed845191436a5d263855f76d6a7b8f4dfac3ed0d4 /src/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3
parentfef307262c3c123f4c49e4825988bc76d9183683 (diff)
downloadopenbsd-c20556b36f9b080fd212baf56e6df9a9644e9310.tar.gz
openbsd-c20556b36f9b080fd212baf56e6df9a9644e9310.tar.bz2
openbsd-c20556b36f9b080fd212baf56e6df9a9644e9310.zip
split seven functions out of the page X509_VERIFY_PARAM_set_flags(3), which
is becoming excessively long, into a new page X509_VERIFY_PARAM_new(3); no content change
Diffstat (limited to 'src/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3')
-rw-r--r--src/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3138
1 files changed, 9 insertions, 129 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 ea3c867b8b..a90fe6ea84 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.17 2021/07/23 16:43:56 schwarze Exp $ 1.\" $OpenBSD: X509_VERIFY_PARAM_set_flags.3,v 1.18 2021/10/18 14:46:37 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,12 +68,10 @@
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: July 23 2021 $ 71.Dd $Mdocdate: October 18 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
75.Nm X509_VERIFY_PARAM_new ,
76.Nm X509_VERIFY_PARAM_free ,
77.Nm X509_VERIFY_PARAM_get0_name , 75.Nm X509_VERIFY_PARAM_get0_name ,
78.Nm X509_VERIFY_PARAM_set1_name , 76.Nm X509_VERIFY_PARAM_set1_name ,
79.Nm X509_VERIFY_PARAM_set_flags , 77.Nm X509_VERIFY_PARAM_set_flags ,
@@ -92,23 +90,10 @@
92.Nm X509_VERIFY_PARAM_get0_peername , 90.Nm X509_VERIFY_PARAM_get0_peername ,
93.Nm X509_VERIFY_PARAM_set1_email , 91.Nm X509_VERIFY_PARAM_set1_email ,
94.Nm X509_VERIFY_PARAM_set1_ip , 92.Nm X509_VERIFY_PARAM_set1_ip ,
95.Nm X509_VERIFY_PARAM_set1_ip_asc , 93.Nm X509_VERIFY_PARAM_set1_ip_asc
96.Nm X509_VERIFY_PARAM_add0_table ,
97.Nm X509_VERIFY_PARAM_lookup ,
98.Nm X509_VERIFY_PARAM_get_count ,
99.Nm X509_VERIFY_PARAM_get0 ,
100.Nm X509_VERIFY_PARAM_table_cleanup
101.Nd X509 verification parameters 94.Nd X509 verification parameters
102.Sh SYNOPSIS 95.Sh SYNOPSIS
103.In openssl/x509_vfy.h 96.In openssl/x509_vfy.h
104.Ft X509_VERIFY_PARAM *
105.Fo X509_VERIFY_PARAM_new
106.Fa void
107.Fc
108.Ft void
109.Fo X509_VERIFY_PARAM_free
110.Fa "X509_VERIFY_PARAM *param"
111.Fc
112.Ft const char * 97.Ft const char *
113.Fo X509_VERIFY_PARAM_get0_name 98.Fo X509_VERIFY_PARAM_get0_name
114.Fa "const X509_VERIFY_PARAM *param" 99.Fa "const X509_VERIFY_PARAM *param"
@@ -204,46 +189,11 @@
204.Fa "X509_VERIFY_PARAM *param" 189.Fa "X509_VERIFY_PARAM *param"
205.Fa "const char *ipasc" 190.Fa "const char *ipasc"
206.Fc 191.Fc
207.Ft int
208.Fo X509_VERIFY_PARAM_add0_table
209.Fa "X509_VERIFY_PARAM *param"
210.Fc
211.Ft const X509_VERIFY_PARAM *
212.Fo X509_VERIFY_PARAM_lookup
213.Fa "const char *name"
214.Fc
215.Ft int
216.Fo X509_VERIFY_PARAM_get_count
217.Fa void
218.Fc
219.Ft const X509_VERIFY_PARAM *
220.Fo X509_VERIFY_PARAM_get0
221.Fa "int id"
222.Fc
223.Ft void
224.Fo X509_VERIFY_PARAM_table_cleanup
225.Fa void
226.Fc
227.Sh DESCRIPTION 192.Sh DESCRIPTION
228These functions manipulate an 193These functions manipulate an
229.Vt X509_VERIFY_PARAM 194.Vt X509_VERIFY_PARAM
230object associated with a certificate verification operation. 195object associated with a certificate verification operation.
231.Pp 196.Pp
232.Fn X509_VERIFY_PARAM_new
233allocates and initializes an empty
234.Vt X509_VERIFY_PARAM
235object.
236.Pp
237.Fn X509_VERIFY_PARAM_free
238clears all data contained in
239.Fa param
240and releases all memory used by it.
241If
242.Fa param
243is a
244.Dv NULL
245pointer, no action occurs.
246.Pp
247.Fn X509_VERIFY_PARAM_get0_name 197.Fn X509_VERIFY_PARAM_get0_name
248returns the name of the given 198returns the name of the given
249.Fa param 199.Fa param
@@ -458,62 +408,15 @@ The condensed "::" notation is supported for IPv6 addresses.
458will fail if 408will fail if
459.Fa ipasc 409.Fa ipasc
460is unparsable. 410is unparsable.
461.Pp
462.Fn X509_VERIFY_PARAM_add0_table
463adds
464.Fa param
465to a static list of
466.Vt X509_VERIFY_PARAM
467objects maintained by the library.
468This function is extremely dangerous because contrary to the name
469of the function, if the list already contains an object that happens
470to have the same name, that old object is not only silently removed
471from the list, but also silently freed, which may silently invalidate
472various pointers existing elsewhere in the program.
473.Pp
474.Fn X509_VERIFY_PARAM_lookup
475searches this list for an object of the given
476.Fa name .
477If no match is found, the predefined objects built-in to the library
478are also inspected.
479.Pp
480.Fn X509_VERIFY_PARAM_get_count
481returns the sum of the number of objects on this list and the number
482of predefined objects built-in to the library.
483Note that this is not necessarily the total number of
484.Vt X509_VERIFY_PARAM
485objects existing in the program because there may be additional such
486objects that were never added to the list.
487.Pp
488.Fn X509_VERIFY_PARAM_get0
489accesses predefined and user-defined objects using
490.Fa id
491as an index, useful for looping over objects without knowing their names.
492An argument less than the number of predefined objects selects
493one of the predefined objects; a higher argument selects an object
494from the list.
495.Pp
496.Fn X509_VERIFY_PARAM_table_cleanup
497deletes all objects from this list.
498It is extremely dangerous because it also invalidates all data that
499was contained in all objects that were on the list and because it
500frees all these objects, which may invalidate various pointers
501existing elsewhere in the program.
502.Sh RETURN VALUES 411.Sh RETURN VALUES
503.Fn X509_VERIFY_PARAM_new
504returns a pointer to the new object, or
505.Dv NULL
506on allocation failure.
507.Pp
508.Fn X509_VERIFY_PARAM_set1_name , 412.Fn X509_VERIFY_PARAM_set1_name ,
509.Fn X509_VERIFY_PARAM_set_flags , 413.Fn X509_VERIFY_PARAM_set_flags ,
510.Fn X509_VERIFY_PARAM_clear_flags , 414.Fn X509_VERIFY_PARAM_clear_flags ,
511.Fn X509_VERIFY_PARAM_set_purpose , 415.Fn X509_VERIFY_PARAM_set_purpose ,
512.Fn X509_VERIFY_PARAM_set_trust , 416.Fn X509_VERIFY_PARAM_set_trust ,
513.Fn X509_VERIFY_PARAM_add0_policy , 417.Fn X509_VERIFY_PARAM_add0_policy ,
514.Fn X509_VERIFY_PARAM_set1_policies ,
515and 418and
516.Fn X509_VERIFY_PARAM_add0_table 419.Fn X509_VERIFY_PARAM_set1_policies
517return 1 for success or 0 for failure. 420return 1 for success or 0 for failure.
518.Pp 421.Pp
519.Fn X509_VERIFY_PARAM_set1_host , 422.Fn X509_VERIFY_PARAM_set1_host ,
@@ -521,7 +424,7 @@ return 1 for success or 0 for failure.
521.Fn X509_VERIFY_PARAM_set1_email , 424.Fn X509_VERIFY_PARAM_set1_email ,
522.Fn X509_VERIFY_PARAM_set1_ip , 425.Fn X509_VERIFY_PARAM_set1_ip ,
523and 426and
524.Fn X509_VERIFY_PARAM_set1_ip_asc , 427.Fn X509_VERIFY_PARAM_set1_ip_asc
525return 1 for success or 0 for failure. 428return 1 for success or 0 for failure.
526A failure from these routines will poison 429A failure from these routines will poison
527the 430the
@@ -543,21 +446,6 @@ return pointers to strings that are only valid
543during the lifetime of the given 446during the lifetime of the given
544.Fa param 447.Fa param
545object and that must not be freed by the application program. 448object and that must not be freed by the application program.
546.Pp
547.Fn X509_VERIFY_PARAM_lookup
548and
549.Fn X509_VERIFY_PARAM_get0
550return a pointer to an existing built-in or user-defined object, or
551.Dv NULL
552if no object with the given
553.Fa name
554is found, or if
555.Fa id
556is at least
557.Fn X509_VERIFY_PARAM_get_count .
558.Pp
559.Fn X509_VERIFY_PARAM_get_count
560returns a number of objects.
561.Sh VERIFICATION FLAGS 449.Sh VERIFICATION FLAGS
562The verification flags consists of zero or more of the following 450The verification flags consists of zero or more of the following
563flags OR'ed together. 451flags OR'ed together.
@@ -702,12 +590,9 @@ X509_VERIFY_PARAM_free(param);
702.Xr SSL_set1_host 3 , 590.Xr SSL_set1_host 3 ,
703.Xr SSL_set1_param 3 , 591.Xr SSL_set1_param 3 ,
704.Xr X509_check_host 3 , 592.Xr X509_check_host 3 ,
705.Xr X509_STORE_CTX_set0_param 3 , 593.Xr X509_verify_cert 3 ,
706.Xr X509_STORE_set1_param 3 , 594.Xr X509_VERIFY_PARAM_new 3
707.Xr X509_verify_cert 3
708.Sh HISTORY 595.Sh HISTORY
709.Fn X509_VERIFY_PARAM_new ,
710.Fn X509_VERIFY_PARAM_free ,
711.Fn X509_VERIFY_PARAM_set1_name , 596.Fn X509_VERIFY_PARAM_set1_name ,
712.Fn X509_VERIFY_PARAM_set_flags , 597.Fn X509_VERIFY_PARAM_set_flags ,
713.Fn X509_VERIFY_PARAM_set_purpose , 598.Fn X509_VERIFY_PARAM_set_purpose ,
@@ -716,11 +601,8 @@ X509_VERIFY_PARAM_free(param);
716.Fn X509_VERIFY_PARAM_add0_policy , 601.Fn X509_VERIFY_PARAM_add0_policy ,
717.Fn X509_VERIFY_PARAM_set1_policies , 602.Fn X509_VERIFY_PARAM_set1_policies ,
718.Fn X509_VERIFY_PARAM_set_depth , 603.Fn X509_VERIFY_PARAM_set_depth ,
719.Fn X509_VERIFY_PARAM_get_depth ,
720.Fn X509_VERIFY_PARAM_add0_table ,
721.Fn X509_VERIFY_PARAM_lookup ,
722and 604and
723.Fn X509_VERIFY_PARAM_table_cleanup 605.Fn X509_VERIFY_PARAM_get_depth
724first appeared in OpenSSL 0.9.8. 606first appeared in OpenSSL 0.9.8.
725.Fn X509_VERIFY_PARAM_clear_flags 607.Fn X509_VERIFY_PARAM_clear_flags
726and 608and
@@ -736,10 +618,8 @@ All these functions have been available since
736.Fn X509_VERIFY_PARAM_get0_peername , 618.Fn X509_VERIFY_PARAM_get0_peername ,
737.Fn X509_VERIFY_PARAM_set1_email , 619.Fn X509_VERIFY_PARAM_set1_email ,
738.Fn X509_VERIFY_PARAM_set1_ip , 620.Fn X509_VERIFY_PARAM_set1_ip ,
739.Fn X509_VERIFY_PARAM_set1_ip_asc ,
740.Fn X509_VERIFY_PARAM_get_count ,
741and 621and
742.Fn X509_VERIFY_PARAM_get0 622.Fn X509_VERIFY_PARAM_set1_ip_asc
743first appeared in OpenSSL 1.0.2 and have been available since 623first appeared in OpenSSL 1.0.2 and have been available since
744.Ox 6.3 . 624.Ox 6.3 .
745.Sh BUGS 625.Sh BUGS