X509_REQ_get_extensions.pod 1.6 KB

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