Skip to main content
  • Home
  • login
  • Browse the archive

    swh mirror partner logo
swh logo
SoftwareHeritage
Software
Heritage
Mirror
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • c54bb69
  • /
  • doc
  • /
  • man3
  • /
  • X509_REQ_get_extensions.pod
Raw File
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge Iframe embedding
swh:1:cnt:26e2438e4f880334ee947a6c03f161df6948ea5e
directory badge Iframe embedding
swh:1:dir:8ed60b50df30bb4e6a7e08b53600d361eb27c54a
X509_REQ_get_extensions.pod
=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(const 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_nid() adds to I<req> a list of X.509 extensions I<exts>,
using I<nid> to identify the extensions attribute.
I<req> is unchanged if I<exts> is NULL or an empty list.
This function may be called more than once on the same I<req> and I<nid>.
In such case any previous extensions are augmented, where an extension to be
added that has the same OID as a pre-existing one replaces this earlier one.

X509_REQ_add_extensions() is like X509_REQ_add_extensions_nid()
except that the default B<NID_ext_req> is used.

=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-2024 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

ENEA — Copyright (C), ENEA. License: GNU AGPLv3+.
Legal notes  ::  JavaScript license information ::  Web API

back to top