]>
Commit | Line | Data |
---|---|---|
eb389a75 JS |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
f64f17c3 SL |
5 | PKCS12_SAFEBAG_get0_attrs, PKCS12_get_attr_gen |
6 | - Retrieve attributes from a PKCS#12 safeBag | |
eb389a75 JS |
7 | |
8 | =head1 SYNOPSIS | |
9 | ||
10 | #include <openssl/pkcs12.h> | |
11 | ||
12 | const STACK_OF(X509_ATTRIBUTE) *PKCS12_SAFEBAG_get0_attrs(const PKCS12_SAFEBAG *bag); | |
13 | ||
14 | ASN1_TYPE *PKCS12_get_attr_gen(const STACK_OF(X509_ATTRIBUTE) *attrs, | |
f64f17c3 | 15 | int attr_nid); |
eb389a75 JS |
16 | |
17 | =head1 DESCRIPTION | |
18 | ||
19 | PKCS12_SAFEBAG_get0_attrs() retrieves the stack of B<X509_ATTRIBUTE>s from a | |
20 | PKCS#12 safeBag. I<bag> is the B<PKCS12_SAFEBAG> to retrieve the attributes from. | |
21 | ||
22 | PKCS12_get_attr_gen() retrieves an attribute by NID from a stack of | |
23 | B<X509_ATTRIBUTE>s. I<attr_nid> is the NID of the attribute to retrieve. | |
24 | ||
25 | =head1 RETURN VALUES | |
26 | ||
27 | PKCS12_SAFEBAG_get0_attrs() returns the stack of B<X509_ATTRIBUTE>s from a | |
28 | PKCS#12 safeBag, which could be empty. | |
29 | ||
30 | PKCS12_get_attr_gen() returns an B<ASN1_TYPE> object containing the attribute, | |
31 | or NULL if the attribute was either not present or an error occurred. | |
32 | ||
33 | PKCS12_get_attr_gen() does not allocate a new attribute. The returned attribute | |
34 | is still owned by the B<PKCS12_SAFEBAG> in which it resides. | |
35 | ||
36 | =head1 SEE ALSO | |
37 | ||
38 | L<PKCS12_get_friendlyname(3)>, | |
eb389a75 JS |
39 | L<PKCS12_add_friendlyname_asc(3)> |
40 | ||
41 | =head1 COPYRIGHT | |
42 | ||
33388b44 | 43 | Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved. |
eb389a75 JS |
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 |