comparison common/listutil.h @ 22:bc302bbceaf5

Move listutil again
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 20 Feb 2014 15:44:09 +0000
parents cinst/listutil.h@f4f957c58e0a
children e783fd99a9eb
comparison
equal deleted inserted replaced
21:dc1e1e9e62ce 22:bc302bbceaf5
1 #ifndef LISTUTIL_H
2 #define LISTUTIL_H
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 #include <stddef.h>
9
10 /**
11 * @file listutil.h
12 * @brief Functions to work with the certificate list.
13 */
14
15 /**
16 * @brief Status of the List Operations
17 */
18 typedef enum {
19 UnknownValidity = 0, // Not yet parsed
20 UnknownError = 1, // The expected unexpected
21 TooLarge = 2, // Failed because the file exeeds the limit
22 InvalidFormat = 3, // File does not appear to be in list format
23 InvalidSignature = 4, // Signature was invalid
24 StatFailed = 5, // Could not stat the file
25 ReadFailed = 6, // Could not read the file
26 IncompatibleVersion = 7, // The Format Version does not match
27 Valid = 8 // List is valid
28 } list_status_t;
29
30 /**
31 * @brief Obtain the complete and verified Certificate list.
32 *
33 * This checks if the file fileName is a valid certificate
34 * list signed by the key specified in pubkey.h
35 *
36 * The caller has to free data.
37 *
38 * @param[in] fileName Name of the file (UTF-8 encoded).
39 * @param[out] data Newly allocated pointer to the file content.
40 * @param[out] size Size in Bytes of the file content.
41 *
42 * @return status of the operation.
43 */
44 list_status_t readAndVerifyList(const char *fileName, char **data, size_t *size);
45 #ifdef __cplusplus
46 }
47 #endif
48 #endif

http://wald.intevation.org/projects/trustbridge/