]>
Commit | Line | Data |
---|---|---|
7b608d08 PY |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
5 | ASN1_STRING_TABLE, ASN1_STRING_TABLE_add, ASN1_STRING_TABLE_get, | |
6 | ASN1_STRING_TABLE_cleanup - ASN1_STRING_TABLE manipulation functions | |
7 | ||
8 | =head1 SYNOPSIS | |
9 | ||
10 | #include <openssl/asn1.h> | |
11 | ||
12 | typedef struct asn1_string_table_st ASN1_STRING_TABLE; | |
13 | ||
14 | int ASN1_STRING_TABLE_add(int nid, long minsize, long maxsize, | |
15 | unsigned long mask, unsigned long flags); | |
16 | ASN1_STRING_TABLE * ASN1_STRING_TABLE_get(int nid); | |
17 | void ASN1_STRING_TABLE_cleanup(void); | |
18 | ||
19 | =head1 DESCRIPTION | |
20 | ||
21 | =head2 Types | |
22 | ||
23 | B<ASN1_STRING_TABLE> is a table which holds string information | |
24 | (basically minimum size, maximum size, type and etc) for a NID object. | |
25 | ||
26 | =head2 Functions | |
27 | ||
28 | ASN1_STRING_TABLE_add() adds a new B<ASN1_STRING_TABLE> item into the | |
29 | local ASN1 string table based on the B<nid> along with other parameters. | |
30 | ||
31 | If the item is already in the table, fields of B<ASN1_STRING_TABLE> are | |
32 | updated (depending on the values of those parameters, e.g., B<minsize> | |
33 | and B<maxsize> >= 0, B<mask> and B<flags> != 0). If the B<nid> is standard, | |
34 | a copy of the standard B<ASN1_STRING_TABLE> is created and updated with | |
35 | other parameters. | |
36 | ||
37 | ASN1_STRING_TABLE_get() searches for an B<ASN1_STRING_TABLE> item based | |
38 | on B<nid>. It will search the local table first, then the standard one. | |
39 | ||
40 | ASN1_STRING_TABLE_cleanup() frees all B<ASN1_STRING_TABLE> items added | |
41 | by ASN1_STRING_TABLE_add(). | |
42 | ||
43 | =head1 RETURN VALUES | |
44 | ||
45 | ASN1_STRING_TABLE_add() returns 1 on success, 0 if an error occurred. | |
46 | ||
47 | ASN1_STRING_TABLE_get() returns a valid B<ASN1_STRING_TABLE> structure | |
48 | or B<NULL> if nothing is found. | |
49 | ||
50 | ASN1_STRING_TABLE_cleanup() does not return a value. | |
51 | ||
52 | =head1 SEE ALSO | |
53 | ||
54 | L<ERR_get_error(3)> | |
55 | ||
56 | =head1 COPYRIGHT | |
57 | ||
58 | Copyright 2017 The OpenSSL Project Authors. All Rights Reserved. | |
59 | ||
60 | Licensed under the OpenSSL license (the "License"). You may not use | |
61 | this file except in compliance with the License. You can obtain a copy | |
62 | in the file LICENSE in the source distribution or at | |
63 | L<https://www.openssl.org/source/license.html>. | |
64 | ||
65 | =cut |