PKCS12_SAFEBAG_get0_attrs.pod 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. =pod
  2. =head1 NAME
  3. PKCS12_SAFEBAG_get0_attrs, PKCS12_get_attr_gen - Retrieve attributes from a PKCS#12 safeBag
  4. =head1 SYNOPSIS
  5. #include <openssl/pkcs12.h>
  6. const STACK_OF(X509_ATTRIBUTE) *PKCS12_SAFEBAG_get0_attrs(const PKCS12_SAFEBAG *bag);
  7. ASN1_TYPE *PKCS12_get_attr_gen(const STACK_OF(X509_ATTRIBUTE) *attrs,
  8. int attr_nid)
  9. =head1 DESCRIPTION
  10. PKCS12_SAFEBAG_get0_attrs() retrieves the stack of B<X509_ATTRIBUTE>s from a
  11. PKCS#12 safeBag. I<bag> is the B<PKCS12_SAFEBAG> to retrieve the attributes from.
  12. PKCS12_get_attr_gen() retrieves an attribute by NID from a stack of
  13. B<X509_ATTRIBUTE>s. I<attr_nid> is the NID of the attribute to retrieve.
  14. =head1 RETURN VALUES
  15. PKCS12_SAFEBAG_get0_attrs() returns the stack of B<X509_ATTRIBUTE>s from a
  16. PKCS#12 safeBag, which could be empty.
  17. PKCS12_get_attr_gen() returns an B<ASN1_TYPE> object containing the attribute,
  18. or NULL if the attribute was either not present or an error occurred.
  19. PKCS12_get_attr_gen() does not allocate a new attribute. The returned attribute
  20. is still owned by the B<PKCS12_SAFEBAG> in which it resides.
  21. =head1 SEE ALSO
  22. L<PKCS12_get_friendlyname(3)>,
  23. L<PKCS12_add_friendlyname_asc(3)>
  24. =head1 COPYRIGHT
  25. Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
  26. Licensed under the Apache License 2.0 (the "License"). You may not use
  27. this file except in compliance with the License. You can obtain a copy
  28. in the file LICENSE in the source distribution or at
  29. L<https://www.openssl.org/source/license.html>.
  30. =cut