From c11f49016e53bf8e7dadcf791bb85152985dd62d Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Tue, 3 Mar 2020 22:51:29 +0100 Subject: [PATCH] DOC: Fixups of X509_LOOKUP.pod Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/11120) --- doc/man3/X509_LOOKUP.pod | 47 ++++++++++++++++++++++++++++++++++------ 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/doc/man3/X509_LOOKUP.pod b/doc/man3/X509_LOOKUP.pod index 603b58c73d..3e0bb6ab22 100644 --- a/doc/man3/X509_LOOKUP.pod +++ b/doc/man3/X509_LOOKUP.pod @@ -57,7 +57,7 @@ to enable lookup in that store. X509_LOOKUP_new() creates a new B using the given lookup I. It can also be created by calling L, which -will associate a B with the lookup mechanism. +will associate an B with the lookup mechanism. X509_LOOKUP_init() initializes the internal state and resources as needed by the given B to do its work. @@ -67,11 +67,13 @@ the given B. X509_LOOKUP_free() destructs the given B. -X509_LOOKUP_set_method_data() and X509_LOOKUP_get_method_data() -associates and retrieves a pointer to application data to and from the -given B, respectively. +X509_LOOKUP_set_method_data() associates a pointer to application data +to the given B. -X509_LOOKUP_ctrl() is used to set or get additional data to or from a +X509_LOOKUP_get_method_data() retrieves a pointer to application data +from the given B. + +X509_LOOKUP_ctrl() is used to set or get additional data to or from an B structure or its associated L. The arguments of the control command are passed via I and I, its return value via I<*ret>. @@ -107,6 +109,37 @@ Some of the underlying Bs will also cache objects matching the criteria in the associated B, which makes it possible to handle cases where the criteria have more than one hit. +=head2 File Types + +X509_LOOKUP_load_file() and X509_LOOKUP_add_dir() take a I, +which can be one of the following: + +=over 4 + +=item B + +The file or files that are loaded are expected to be in PEM format. + +=item B + +The file or files that are loaded are expected to be in raw DER format. + +=item B + +The default certificate file or directory is used. In this case, +I is ignored. + +=begin comment + +TODO +Document X509_get_default_cert_file_env(3), +X509_get_default_cert_file(3), X509_get_default_cert_dir_env(3) and +X509_get_default_cert_dir(3) and link to them here. + +=end comment + +=back + =head2 Control Commands The Bs built into OpenSSL recognise the following @@ -139,7 +172,7 @@ The URI is passed in I. =head1 RETURN VALUES -X509_LOOKUP_new() returns a B pointer when successful, +X509_LOOKUP_new() returns an B pointer when successful, or NULL on error. X509_LOOKUP_init() and X509_LOOKUP_shutdown() return 1 on success, or @@ -152,7 +185,7 @@ Otherwise, it returns what the control function in the B returns, which is usually 1 on success and 0 in error. -X509_LOOKUP_get_store() returns a B pointer if there is +X509_LOOKUP_get_store() returns an B pointer if there is one, otherwise NULL. X509_LOOKUP_by_subject(), X509_LOOKUP_by_issuer_serial(), -- 2.25.1