From 854d883039b53e37f07731ee8905024a8a71db23 Mon Sep 17 00:00:00 2001 From: "Dr. David von Oheimb" Date: Mon, 1 Aug 2022 16:35:42 +0200 Subject: add missing doc of X509_REQ_get_extensions() and X509_REQ_add_extensions{,_nid}() Reviewed-by: Tomas Mraz Reviewed-by: Matt Caswell Reviewed-by: David von Oheimb (cherry picked from commit 47dc828c6b652feb9cef5b0e4186d010986f197c) Reviewed-by: Tom Cosgrove (Merged from https://github.com/openssl/openssl/pull/23190) (cherry picked from commit 8632c09a2cd7be884b62e3cc94de84167c806f3d) --- doc/build.info | 6 +++++ doc/man3/X509_REQ_get_extensions.pod | 50 ++++++++++++++++++++++++++++++++++++ util/missingcrypto.txt | 1 - 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 doc/man3/X509_REQ_get_extensions.pod diff --git a/doc/build.info b/doc/build.info index e3ec1fe46b..0279e2390a 100644 --- a/doc/build.info +++ b/doc/build.info @@ -2715,6 +2715,10 @@ DEPEND[html/man3/X509_REQ_get_attr.html]=man3/X509_REQ_get_attr.pod GENERATE[html/man3/X509_REQ_get_attr.html]=man3/X509_REQ_get_attr.pod DEPEND[man/man3/X509_REQ_get_attr.3]=man3/X509_REQ_get_attr.pod GENERATE[man/man3/X509_REQ_get_attr.3]=man3/X509_REQ_get_attr.pod +DEPEND[html/man3/X509_REQ_get_extensions.html]=man3/X509_REQ_get_extensions.pod +GENERATE[html/man3/X509_REQ_get_extensions.html]=man3/X509_REQ_get_extensions.pod +DEPEND[man/man3/X509_REQ_get_extensions.3]=man3/X509_REQ_get_extensions.pod +GENERATE[man/man3/X509_REQ_get_extensions.3]=man3/X509_REQ_get_extensions.pod DEPEND[html/man3/X509_SIG_get0.html]=man3/X509_SIG_get0.pod GENERATE[html/man3/X509_SIG_get0.html]=man3/X509_SIG_get0.pod DEPEND[man/man3/X509_SIG_get0.3]=man3/X509_SIG_get0.pod @@ -3458,6 +3462,7 @@ html/man3/X509_NAME_get_index_by_NID.html \ html/man3/X509_NAME_print_ex.html \ html/man3/X509_PUBKEY_new.html \ html/man3/X509_REQ_get_attr.html \ +html/man3/X509_REQ_get_extensions.html \ html/man3/X509_SIG_get0.html \ html/man3/X509_STORE_CTX_get_error.html \ html/man3/X509_STORE_CTX_new.html \ @@ -4065,6 +4070,7 @@ man/man3/X509_NAME_get_index_by_NID.3 \ man/man3/X509_NAME_print_ex.3 \ man/man3/X509_PUBKEY_new.3 \ man/man3/X509_REQ_get_attr.3 \ +man/man3/X509_REQ_get_extensions.3 \ man/man3/X509_SIG_get0.3 \ man/man3/X509_STORE_CTX_get_error.3 \ man/man3/X509_STORE_CTX_new.3 \ diff --git a/doc/man3/X509_REQ_get_extensions.pod b/doc/man3/X509_REQ_get_extensions.pod new file mode 100644 index 0000000000..7a3932c3d6 --- /dev/null +++ b/doc/man3/X509_REQ_get_extensions.pod @@ -0,0 +1,50 @@ +=pod + +=head1 NAME + +X509_REQ_get_extensions, +X509_REQ_add_extensions, X509_REQ_add_extensions_nid +- handle X.509 extension attributes of a CSR + +=head1 SYNOPSIS + + #include + + STACK_OF(X509_EXTENSION) *X509_REQ_get_extensions(X509_REQ *req); + int X509_REQ_add_extensions(X509_REQ *req, const STACK_OF(X509_EXTENSION) *exts); + int X509_REQ_add_extensions_nid(X509_REQ *req, + const STACK_OF(X509_EXTENSION) *exts, int nid); + +=head1 DESCRIPTION + +X509_REQ_get_extensions() returns the first list of X.509 extensions +found in the attributes of I. +The returned list is empty if there are no such extensions in I. +The caller is responsible for freeing the list obtained. + +X509_REQ_add_extensions() adds to I a list of X.509 extensions I, +which must not be NULL, using the default B. +This function must not be called more than once on the same I. + +X509_REQ_add_extensions_nid() is like X509_REQ_add_extensions() +except that I is used to identify the extensions attribute. +This function must not be called more than once with the same I and I. + +=head1 RETURN VALUES + +X509_REQ_get_extensions() returns a pointer to B +or NULL on error. + +X509_REQ_add_extensions() and X509_REQ_add_extensions_nid() +return 1 on success, 0 on error. + +=head1 COPYRIGHT + +Copyright 2022 The OpenSSL Project Authors. All Rights Reserved. + +Licensed under the Apache License 2.0 (the "License"). You may not use +this file except in compliance with the License. You can obtain a copy +in the file LICENSE in the source distribution or at +L. + +=cut diff --git a/util/missingcrypto.txt b/util/missingcrypto.txt index 9d9cd871f1..b59bcd0dcc 100644 --- a/util/missingcrypto.txt +++ b/util/missingcrypto.txt @@ -1160,7 +1160,6 @@ X509_REQ_delete_attr(3) X509_REQ_extension_nid(3) X509_REQ_get1_email(3) X509_REQ_get_extension_nids(3) -X509_REQ_get_extensions(3) X509_REQ_it(3) X509_REQ_print(3) X509_REQ_print_ex(3) -- cgit v1.2.3