]>
Commit | Line | Data |
---|---|---|
0e8020a4 DHG |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
5 | OSSL_IETF_ATTR_SYNTAX, | |
6 | OSSL_IETF_ATTR_SYNTAX_get0_policyAuthority, | |
7 | OSSL_IETF_ATTR_SYNTAX_set0_policyAuthority, | |
8 | OSSL_IETF_ATTR_SYNTAX_get_value_num, | |
9 | OSSL_IETF_ATTR_SYNTAX_get0_value, | |
10 | OSSL_IETF_ATTR_SYNTAX_add1_value | |
11 | - Accessors and setters for OSSL_IETF_ATTR_SYNTAX | |
12 | ||
13 | =head1 SYNOPSIS | |
14 | ||
15 | #include <openssl/x509_acert.h> | |
16 | ||
17 | typedef struct OSSL_IETF_ATTR_SYNTAX_st OSSL_IETF_ATTR_SYNTAX; | |
18 | ||
19 | const GENERAL_NAMES * | |
20 | OSSL_IETF_ATTR_SYNTAX_get0_policyAuthority(const OSSL_IETF_ATTR_SYNTAX *a); | |
21 | void OSSL_IETF_ATTR_SYNTAX_set0_policyAuthority(OSSL_IETF_ATTR_SYNTAX *a, | |
22 | GENERAL_NAMES *names); | |
23 | ||
24 | int OSSL_IETF_ATTR_SYNTAX_get_value_num(const OSSL_IETF_ATTR_SYNTAX *a); | |
25 | void *OSSL_IETF_ATTR_SYNTAX_get0_value(const OSSL_IETF_ATTR_SYNTAX *a, | |
26 | int ind, int *type); | |
27 | int OSSL_IETF_ATTR_SYNTAX_add1_value(OSSL_IETF_ATTR_SYNTAX *a, int type, | |
28 | void *data); | |
29 | ||
30 | =head1 DESCRIPTION | |
31 | ||
32 | B<OSSL_IETF_ATTR_SYNTAX> is an opaque structure that represents the | |
33 | IetfAttrSyntax type defined in RFC 5755 (Section 4.4) for use | |
34 | as an AttributeValue. | |
35 | ||
36 | OSSL_IETF_ATTR_SYNTAX_get0_policyAuthority() and OSSL_IETF_ATTR_SYNTAX_set0_policyAuthority() | |
37 | get and set the policyAuthority field of the structure. Both routines act on | |
38 | internal pointers of the structure and must not be freed by the application. | |
39 | ||
40 | An B<OSSL_IETF_ATTR_SYNTAX> object also holds a sequence of values. | |
41 | OSSL_IETF_ATTR_SYNTAX_get_value_num() returns the number of values in the | |
42 | sequence. OSSL_IETF_ATTR_SYNTAX_add1_value(), adds a copy of I<data> of a specified | |
43 | I<type> to the sequence. The caller should free the I<data> after use. | |
44 | ||
45 | OSSL_IETF_ATTR_SYNTAX_get0_value() will return the value and a specific index I<ind> | |
46 | in the sequence or NULL on error. If I<type> is not NULL, the type of the | |
47 | value will be written to this location. | |
48 | ||
49 | The I<type> of the values stored in the B<OSSL_IETF_ATTR_SYNTAX> value sequence is | |
50 | one of the following: | |
51 | ||
52 | =over 4 | |
53 | ||
54 | =item OSSL_IETFAS_OCTETS | |
55 | ||
56 | A pointer to an ASN1_OCTET_STRING | |
57 | ||
58 | =item OSSL_IETFAS_OID | |
59 | ||
60 | A pointer to an ASN1_OBJECT | |
61 | ||
62 | =item OSSL_IETFAS_STRING | |
63 | ||
64 | A pointer to an ASN1_UTF8STRING | |
65 | ||
66 | =back | |
67 | ||
68 | =head1 RETURN VALUES | |
69 | ||
70 | OSSL_IETF_ATTR_SYNTAX_get0_policyAuthority() returns an pointer to a | |
71 | B<GENERAL_NAMES> structure or B<NULL> if the policy authority has not been | |
72 | set. | |
73 | ||
74 | OSSL_IETF_ATTR_SYNTAX_get_value_num() returns the number of entries in the value | |
75 | sequence or -1 on error. | |
76 | ||
77 | OSSL_IETF_ATTR_SYNTAX_get0_value() returns a pointer to the value at the given index | |
78 | or NULL if the index is out of range. | |
79 | ||
80 | OSSL_IETF_ATTR_SYNTAX_add1_value() returns 1 on success and 0 on failure. | |
81 | ||
82 | =head1 HISTORY | |
83 | ||
84 | OSSL_IETF_ATTR_SYNTAX_get0_policyAuthority(), OSSL_IETF_ATTR_SYNTAX_set0_policyAuthority(), | |
85 | OSSL_IETF_ATTR_SYNTAX_get_value_num(), OSSL_IETF_ATTR_SYNTAX_get0_value(), and | |
86 | OSSL_IETF_ATTR_SYNTAX_add1_value() were added in OpenSSL 3.4. | |
87 | ||
88 | =head1 COPYRIGHT | |
89 | ||
90 | Copyright 2021 The OpenSSL Project Authors. All Rights Reserved. | |
91 | ||
92 | Licensed under the Apache License 2.0 (the "License"). You may not use | |
93 | this file except in compliance with the License. You can obtain a copy | |
94 | in the file LICENSE in the source distribution or at | |
95 | L<https://www.openssl.org/source/license.html>. | |
96 | ||
97 | =cut |