Fix up path generation to use OPENSSL_MODULES
[openssl.git] / doc / man3 / X509_REQ_get_extensions.pod
1 =pod
2
3 =head1 NAME
4
5 X509_REQ_get_extensions,
6 X509_REQ_add_extensions, X509_REQ_add_extensions_nid
7 - handle X.509 extension attributes of a CSR
8
9 =head1 SYNOPSIS
10
11  #include <openssl/x509.h>
12
13  STACK_OF(X509_EXTENSION) *X509_REQ_get_extensions(X509_REQ *req);
14  int X509_REQ_add_extensions(X509_REQ *req, const STACK_OF(X509_EXTENSION) *exts);
15  int X509_REQ_add_extensions_nid(X509_REQ *req,
16                                  const STACK_OF(X509_EXTENSION) *exts, int nid);
17
18 =head1 DESCRIPTION
19
20 X509_REQ_get_extensions() returns the first list of X.509 extensions
21 found in the attributes of I<req>.
22 The returned list is empty if there are no such extensions in I<req>.
23 The caller is responsible for freeing the list obtained.
24
25 X509_REQ_add_extensions() adds to I<req> a list of X.509 extensions I<exts>,
26 which must not be NULL, using the default B<NID_ext_req>.
27 This function must not be called more than once on the same I<req>.
28
29 X509_REQ_add_extensions_nid() is like X509_REQ_add_extensions()
30 except that I<nid> is used to identify the extensions attribute.
31 This function must not be called more than once with the same I<req> and I<nid>.
32
33 =head1 RETURN VALUES
34
35 X509_REQ_get_extensions() returns a pointer to B<STACK_OF(X509_EXTENSION)>
36 or NULL on error.
37
38 X509_REQ_add_extensions() and X509_REQ_add_extensions_nid()
39 return 1 on success, 0 on error.
40
41 =head1 COPYRIGHT
42
43 Copyright 2022 The OpenSSL Project Authors. All Rights Reserved.
44
45 Licensed under the Apache License 2.0 (the "License").  You may not use
46 this file except in compliance with the License.  You can obtain a copy
47 in the file LICENSE in the source distribution or at
48 L<https://www.openssl.org/source/license.html>.
49
50 =cut