Skip to content

Commit

Permalink
add missing doc of X509_REQ_get_extensions() and X509_REQ_add_extensi…
Browse files Browse the repository at this point in the history
…ons{,_nid}()

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from #18931)
  • Loading branch information
DDvO committed Aug 24, 2022
1 parent e128eaa commit 47dc828
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 3 deletions.
6 changes: 6 additions & 0 deletions doc/build.info
Original file line number Diff line number Diff line change
Expand Up @@ -2675,6 +2675,10 @@ DEPEND[html/man3/X509_PUBKEY_new.html]=man3/X509_PUBKEY_new.pod
GENERATE[html/man3/X509_PUBKEY_new.html]=man3/X509_PUBKEY_new.pod
DEPEND[man/man3/X509_PUBKEY_new.3]=man3/X509_PUBKEY_new.pod
GENERATE[man/man3/X509_PUBKEY_new.3]=man3/X509_PUBKEY_new.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
Expand Down Expand Up @@ -3412,6 +3416,7 @@ html/man3/X509_NAME_get0_der.html \
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_extensions.html \
html/man3/X509_SIG_get0.html \
html/man3/X509_STORE_CTX_get_by_subject.html \
html/man3/X509_STORE_CTX_get_error.html \
Expand Down Expand Up @@ -4010,6 +4015,7 @@ man/man3/X509_NAME_get0_der.3 \
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_extensions.3 \
man/man3/X509_SIG_get0.3 \
man/man3/X509_STORE_CTX_get_by_subject.3 \
man/man3/X509_STORE_CTX_get_error.3 \
Expand Down
50 changes: 50 additions & 0 deletions doc/man3/X509_REQ_get_extensions.pod
Original file line number Diff line number Diff line change
@@ -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 <openssl/x509.h>

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<req>.
The returned list is empty if there are no such extensions in I<req>.
The caller is responsible for freeing the list obtained.

X509_REQ_add_extensions() adds to I<req> a list of X.509 extensions I<exts>,
which must not be NULL, using the default B<NID_ext_req>.
This function must not be called more than once on the same I<req>.

X509_REQ_add_extensions_nid() is like X509_REQ_add_extensions()
except that I<nid> is used to identify the extensions attribute.
This function must not be called more than once with the same I<req> and I<nid>.

=head1 RETURN VALUES

X509_REQ_get_extensions() returns a pointer to B<STACK_OF(X509_EXTENSION)>
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<https://www.openssl.org/source/license.html>.

=cut
3 changes: 0 additions & 3 deletions util/missingcrypto.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1244,8 +1244,6 @@ X509_REQ_add1_attr(3)
X509_REQ_add1_attr_by_NID(3)
X509_REQ_add1_attr_by_OBJ(3)
X509_REQ_add1_attr_by_txt(3)
X509_REQ_add_extensions(3)
X509_REQ_add_extensions_nid(3)
X509_REQ_delete_attr(3)
X509_REQ_extension_nid(3)
X509_REQ_get1_email(3)
Expand All @@ -1254,7 +1252,6 @@ X509_REQ_get_attr_by_NID(3)
X509_REQ_get_attr_by_OBJ(3)
X509_REQ_get_attr_count(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)
Expand Down

0 comments on commit 47dc828

Please sign in to comment.