Mercurial > trustbridge
annotate cinst/nss-secitemlist.h @ 1324:b6fb5d347023
Store last folder from which certificates were added.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Tue, 14 Oct 2014 18:11:36 +0200 |
parents | 82fab0c689bf |
children |
rev | line source |
---|---|
404 | 1 /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik |
2 * Software engineering by Intevation GmbH | |
3 * | |
4 * This file is Free Software under the GNU GPL (v>=2) | |
5 * and comes with ABSOLUTELY NO WARRANTY! | |
6 * See LICENSE.txt for details. | |
7 */ | |
242
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
8 #ifndef NSS_SECITEMLIST_H |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
9 #define NSS_SECITEMLIST_H |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
10 |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
11 /** |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
12 * @file |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
13 * @brief Functions to handle lists of NSS SECItem-s. |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
14 */ |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
15 |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
16 #include <seccomon.h> |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
17 #include "strhelp.h" |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
18 |
1255
2a1aa9df8f11
(issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1053
diff
changeset
|
19 /** |
2a1aa9df8f11
(issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1053
diff
changeset
|
20 * @struct seciteml |
2a1aa9df8f11
(issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1053
diff
changeset
|
21 * @brief simple linked list sturcture. */ |
242
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
22 struct seciteml { |
1255
2a1aa9df8f11
(issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1053
diff
changeset
|
23 /*@{*/ |
2a1aa9df8f11
(issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1053
diff
changeset
|
24 SECItem *item;/**< Pointer to the held item*/ |
2a1aa9df8f11
(issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1053
diff
changeset
|
25 struct seciteml *next;/**< Pointer to the next part of the list*/ |
2a1aa9df8f11
(issue133) Improve API documentation
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1053
diff
changeset
|
26 /*@}*/ |
242
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
27 }; |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
28 |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
29 /** |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
30 * @brief Type for SECItem lists |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
31 */ |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
32 typedef struct seciteml seciteml_t; |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
33 |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
34 /** |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
35 * @brief Prepend a new SECItem to list |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
36 * |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
37 * The data will be copied. |
1304
82fab0c689bf
Fix doxygen syntax error. Change inout to in,out
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1255
diff
changeset
|
38 * @param[in,out] list pointer to the list to which the item will be added. |
242
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
39 * @param[in] item the SECItem to add to the list. |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
40 */ |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
41 void seciteml_push (seciteml_t **list, SECItem *item); |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
42 |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
43 /** |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
44 * @brief Remove and return first SECItem from list |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
45 * |
1304
82fab0c689bf
Fix doxygen syntax error. Change inout to in,out
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1255
diff
changeset
|
46 * @param[in,out] list pointer to the list to which the item will be added. |
1053
78798d3af8f0
Fixed doxygen build warnings.
Emanuel Schuetze <emanuel@intevation.de>
parents:
493
diff
changeset
|
47 * @returns the removed item, or NULL if list is empty. |
242
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
48 * The caller shoud free this item after use. |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
49 */ |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
50 SECItem *seciteml_pop (seciteml_t **list); |
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
51 |
493
48d7b956bd98
Change loop order of installation to only call NSS_Initialize once per db
Andre Heinecke <aheinecke@intevation.de>
parents:
404
diff
changeset
|
52 /** |
48d7b956bd98
Change loop order of installation to only call NSS_Initialize once per db
Andre Heinecke <aheinecke@intevation.de>
parents:
404
diff
changeset
|
53 * @brief Free a secitem list |
48d7b956bd98
Change loop order of installation to only call NSS_Initialize once per db
Andre Heinecke <aheinecke@intevation.de>
parents:
404
diff
changeset
|
54 * |
48d7b956bd98
Change loop order of installation to only call NSS_Initialize once per db
Andre Heinecke <aheinecke@intevation.de>
parents:
404
diff
changeset
|
55 * Frees a secitem list |
48d7b956bd98
Change loop order of installation to only call NSS_Initialize once per db
Andre Heinecke <aheinecke@intevation.de>
parents:
404
diff
changeset
|
56 * |
1304
82fab0c689bf
Fix doxygen syntax error. Change inout to in,out
Andre Heinecke <andre.heinecke@intevation.de>
parents:
1255
diff
changeset
|
57 * @param[in,out] list pointer to the list which should be freed. set to NULL |
493
48d7b956bd98
Change loop order of installation to only call NSS_Initialize once per db
Andre Heinecke <aheinecke@intevation.de>
parents:
404
diff
changeset
|
58 */ |
48d7b956bd98
Change loop order of installation to only call NSS_Initialize once per db
Andre Heinecke <aheinecke@intevation.de>
parents:
404
diff
changeset
|
59 void seciteml_free (seciteml_t **list); |
48d7b956bd98
Change loop order of installation to only call NSS_Initialize once per db
Andre Heinecke <aheinecke@intevation.de>
parents:
404
diff
changeset
|
60 |
48d7b956bd98
Change loop order of installation to only call NSS_Initialize once per db
Andre Heinecke <aheinecke@intevation.de>
parents:
404
diff
changeset
|
61 |
242
809eaca3898c
Added helper functions to handle lists of NSS SECItems.
Sascha Wilde <wilde@intevation.de>
parents:
diff
changeset
|
62 #endif |